From bb99e5c4ac7f24d40e11ead392172b340b17fc26 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Wed, 14 Dec 2016 00:44:06 +0100 Subject: [PATCH] Only start dragging on left mouse click --- plugins/Sidebar/media/Sidebar.coffee | 2 ++ plugins/Sidebar/media/all.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/plugins/Sidebar/media/Sidebar.coffee b/plugins/Sidebar/media/Sidebar.coffee index 59ac6b5f..aea6dc72 100644 --- a/plugins/Sidebar/media/Sidebar.coffee +++ b/plugins/Sidebar/media/Sidebar.coffee @@ -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 diff --git a/plugins/Sidebar/media/all.js b/plugins/Sidebar/media/all.js index 2afbf5dd..a669a23f 100644 --- a/plugins/Sidebar/media/all.js +++ b/plugins/Sidebar/media/all.js @@ -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");