Only start dragging on left mouse click

This commit is contained in:
shortcutme 2016-12-14 00:44:06 +01:00
parent 9e97f0d318
commit bb99e5c4ac
2 changed files with 5 additions and 0 deletions

View file

@ -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

View file

@ -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");