From 50708030e03433ed7004bf2d9c8548c999339ab3 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 30 May 2012 00:56:55 +0200 Subject: [PATCH] Don't $.rm elements that have been dragged when using UI.hover. --- 4chan_x.user.js | 3 ++- script.coffee | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index fb4ffa8b1..c5137e6ba 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -237,7 +237,8 @@ el = UI.el; localStorage["" + Main.namespace + el.id + ".position"] = el.style.cssText; d.removeEventListener('mousemove', UI.drag, false); - return d.removeEventListener('mouseup', UI.dragend, false); + d.removeEventListener('mouseup', UI.dragend, false); + return delete UI.el; }, hover: function(e) { var clientHeight, clientWidth, clientX, clientY, height, style, top, _ref; diff --git a/script.coffee b/script.coffee index 9bee54a20..e9e6187f7 100644 --- a/script.coffee +++ b/script.coffee @@ -207,6 +207,7 @@ UI = localStorage["#{Main.namespace}#{el.id}.position"] = el.style.cssText d.removeEventListener 'mousemove', UI.drag, false d.removeEventListener 'mouseup', UI.dragend, false + delete UI.el hover: (e) -> {clientX, clientY} = e {style} = UI.el