Skip to content

Commit 4192bd5

Browse files
committed
Revert "[Critical Bug] dynamically assign isOverPanel to reduce mistaken mousewheel captures"
1 parent 4913845 commit 4192bd5

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

jquery.slimscroll.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@
9393
// used in event handlers and for better minification
9494
var me = $(this);
9595

96-
// create a simple function to check if panel is being hovered over.
97-
isOverPanel = function () {
98-
return me.is(":hover");
99-
}
100-
10196
// ensure we are not binding it again
10297
if (me.parent().hasClass(o.wrapperClass))
10398
{
@@ -261,9 +256,11 @@
261256

262257
// show on parent mouseover
263258
me.hover(function(){
259+
isOverPanel = true;
264260
showBar();
265261
hideBar();
266262
}, function(){
263+
isOverPanel = false;
267264
hideBar();
268265
});
269266

@@ -317,7 +314,7 @@
317314
function _onWheel(e)
318315
{
319316
// use mouse wheel only when mouse is over
320-
if (!isOverPanel()) { return; }
317+
if (!isOverPanel) { return; }
321318

322319
var e = e || window.event;
323320

@@ -450,7 +447,7 @@
450447
if (!o.alwaysVisible)
451448
{
452449
queueHide = setTimeout(function(){
453-
if (!(o.disableFadeOut && isOverPanel()) && !isOverBar && !isDragg)
450+
if (!(o.disableFadeOut && isOverPanel) && !isOverBar && !isDragg)
454451
{
455452
bar.fadeOut('slow');
456453
rail.fadeOut('slow');

0 commit comments

Comments
 (0)