From 1039f366372eac6f8f2dcedb58d78b817e65dbc6 Mon Sep 17 00:00:00 2001 From: A-Kalkhoff Date: Tue, 14 Jul 2015 14:03:02 +0200 Subject: [PATCH] Refering issue #313 Namespaces added mouseup-events Added unbind on elem-mouseup-event in destroy() --- script/jquery.jscrollpane.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script/jquery.jscrollpane.js b/script/jquery.jscrollpane.js index 00a4e5b6..c1b38a9b 100644 --- a/script/jquery.jscrollpane.js +++ b/script/jquery.jscrollpane.js @@ -105,7 +105,7 @@ } // Workaround for #313 to prevent the scrollbars from being sticky if containing elements stop the propagation of the events - elem.bind('mouseup',cancelDrag); + elem.bind('mouseup.jsp',cancelDrag); function initialise(s) { @@ -288,7 +288,7 @@ verticalDrag = verticalTrack.find('>.jspDrag'); // Workaround for #313 to prevent infinite loop in initClickOnTrack() if containing elements stop the propagation of the events - verticalTrack.bind('mouseup', function(){$(document).mouseup();}); + verticalTrack.bind('mouseup.jsp', function(){$(document).mouseup();}); if (settings.showArrows) { arrowUp = $('').bind( @@ -1234,6 +1234,7 @@ if (reinitialiseInterval) { clearInterval(reinitialiseInterval); } + elem.unbind('mouseup.jsp',cancelDrag); } // Public API