From 9523e6626f23fe27a1af06f1501d6e7967ac6b91 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 25 May 2011 11:21:55 +0200 Subject: [PATCH] Fix jumping dialogs --- 4chan_x.js | 3 ++- script.coffee | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index c500a37e9..93a4f903c 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -225,9 +225,10 @@ top = clientY - 120; bot = top + height; el.style.top = ui.winHeight < height || top < 0 ? '0px' : bot > ui.winHeight ? ui.winHeight - height + 'px' : top + 'px'; - return el.style.left = clientX + 45; + return el.style.left = clientX + 45 + 'px'; }, hoverend: function(e) { + ui.el.style.top = 'auto'; return $.hide(ui.el); } }; diff --git a/script.coffee b/script.coffee index 75a7a16d3..db25f653f 100644 --- a/script.coffee +++ b/script.coffee @@ -147,8 +147,9 @@ ui = ui.winHeight - height + 'px' else top + 'px' - el.style.left = clientX + 45 + el.style.left = clientX + 45 + 'px' hoverend: (e) -> + ui.el.style.top = 'auto' $.hide ui.el #convenience