Prevent MMB or RMB dialog dragging. #932
This commit is contained in:
parent
8d144739a7
commit
cbd28083d5
@ -452,6 +452,9 @@
|
|||||||
})();
|
})();
|
||||||
dragstart = function(e) {
|
dragstart = function(e) {
|
||||||
var el, isTouching, o, rect, screenHeight, screenWidth;
|
var el, isTouching, o, rect, screenHeight, screenWidth;
|
||||||
|
if (e.type === 'mousedown' && e.button !== 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
el = $.x('ancestor::div[contains(@class,"dialog")][1]', this);
|
el = $.x('ancestor::div[contains(@class,"dialog")][1]', this);
|
||||||
if (isTouching = e.type === 'touchstart') {
|
if (isTouching = e.type === 'touchstart') {
|
||||||
|
|||||||
@ -197,6 +197,8 @@ UI = do ->
|
|||||||
|
|
||||||
|
|
||||||
dragstart = (e) ->
|
dragstart = (e) ->
|
||||||
|
if e.type is 'mousedown' and e.button isnt 0 # not LMB
|
||||||
|
return
|
||||||
# prevent text selection
|
# prevent text selection
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
el = $.x 'ancestor::div[contains(@class,"dialog")][1]', @
|
el = $.x 'ancestor::div[contains(@class,"dialog")][1]', @
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user