Only start dragging on left mouse click
This commit is contained in:
parent
9e97f0d318
commit
bb99e5c4ac
2 changed files with 5 additions and 0 deletions
|
@ -37,6 +37,8 @@ class Sidebar extends Class
|
|||
|
||||
# Detect dragging
|
||||
@fixbutton.on "mousedown touchstart", (e) =>
|
||||
if event.button > 0 # Right or middle click
|
||||
return
|
||||
e.preventDefault()
|
||||
|
||||
# Disable previous listeners
|
||||
|
|
|
@ -237,6 +237,9 @@ window.initScrollable = function () {
|
|||
*/
|
||||
this.fixbutton.on("mousedown touchstart", (function(_this) {
|
||||
return function(e) {
|
||||
if (event.button > 0) {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
_this.fixbutton.off("click touchstop touchcancel");
|
||||
_this.fixbutton.off("mousemove touchmove");
|
||||
|
|
Loading…
Reference in a new issue