Prevent MMB or RMB dialog dragging. #932

This commit is contained in:
Nicolas Stepien 2013-02-28 04:41:24 +01:00
parent 8d144739a7
commit cbd28083d5
2 changed files with 5 additions and 0 deletions

View File

@ -452,6 +452,9 @@
})();
dragstart = function(e) {
var el, isTouching, o, rect, screenHeight, screenWidth;
if (e.type === 'mousedown' && e.button !== 0) {
return;
}
e.preventDefault();
el = $.x('ancestor::div[contains(@class,"dialog")][1]', this);
if (isTouching = e.type === 'touchstart') {

View File

@ -197,6 +197,8 @@ UI = do ->
dragstart = (e) ->
if e.type is 'mousedown' and e.button isnt 0 # not LMB
return
# prevent text selection
e.preventDefault()
el = $.x 'ancestor::div[contains(@class,"dialog")][1]', @