From 4192bd561bb9bf65e32bb0fea95047e78166abb6 Mon Sep 17 00:00:00 2001 From: Piotr Rochala Date: Mon, 1 Sep 2014 10:14:10 +1000 Subject: [PATCH] Revert "[Critical Bug] dynamically assign isOverPanel to reduce mistaken mousewheel captures" --- jquery.slimscroll.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js index d219493..4d759ad 100644 --- a/jquery.slimscroll.js +++ b/jquery.slimscroll.js @@ -93,11 +93,6 @@ // used in event handlers and for better minification var me = $(this); - // create a simple function to check if panel is being hovered over. - isOverPanel = function () { - return me.is(":hover"); - } - // ensure we are not binding it again if (me.parent().hasClass(o.wrapperClass)) { @@ -261,9 +256,11 @@ // show on parent mouseover me.hover(function(){ + isOverPanel = true; showBar(); hideBar(); }, function(){ + isOverPanel = false; hideBar(); }); @@ -317,7 +314,7 @@ function _onWheel(e) { // use mouse wheel only when mouse is over - if (!isOverPanel()) { return; } + if (!isOverPanel) { return; } var e = e || window.event; @@ -450,7 +447,7 @@ if (!o.alwaysVisible) { queueHide = setTimeout(function(){ - if (!(o.disableFadeOut && isOverPanel()) && !isOverBar && !isDragg) + if (!(o.disableFadeOut && isOverPanel) && !isOverBar && !isDragg) { bar.fadeOut('slow'); rail.fadeOut('slow');