Fix sidebar opening for fast mouse movements
This commit is contained in:
parent
84268cd43c
commit
a208f47b6a
2 changed files with 9 additions and 8 deletions
|
@ -40,11 +40,15 @@ class Sidebar extends Class
|
|||
|
||||
# Disable previous listeners
|
||||
@fixbutton.off "click touchend touchcancel"
|
||||
@fixbutton.off "mousemove touchmove"
|
||||
|
||||
# Make sure its not a click
|
||||
@dragStarted = (+ new Date)
|
||||
@fixbutton.one "mousemove touchmove", (e) =>
|
||||
|
||||
# Fullscreen drag bg to capture mouse events over iframe
|
||||
$(".drag-bg").remove()
|
||||
$("<div class='drag-bg'></div>").appendTo(document.body)
|
||||
|
||||
$("body").one "mousemove touchmove", (e) =>
|
||||
mousex = e.pageX
|
||||
mousey = e.pageY
|
||||
if not mousex
|
||||
|
@ -80,9 +84,6 @@ class Sidebar extends Class
|
|||
|
||||
@fixbutton.addClass("dragging")
|
||||
|
||||
# Fullscreen drag bg to capture mouse events over iframe
|
||||
$("<div class='drag-bg'></div>").appendTo(document.body)
|
||||
|
||||
# IE position wrap fix
|
||||
if navigator.userAgent.indexOf('MSIE') != -1 or navigator.appVersion.indexOf('Trident/') > 0
|
||||
@fixbutton.css("pointer-events", "none")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue