Skip to content

Commit

Permalink
Refering issue vitch#313
Browse files Browse the repository at this point in the history
Namespaces added mouseup-events
Added unbind on elem-mouseup-event in destroy()
  • Loading branch information
A-Kalkhoff committed Jul 14, 2015
1 parent d57c3dd commit 1039f36
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions script/jquery.jscrollpane.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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 = $('<a class="jspArrow jspArrowUp" />').bind(
Expand Down Expand Up @@ -1234,6 +1234,7 @@
if (reinitialiseInterval) {
clearInterval(reinitialiseInterval);
}
elem.unbind('mouseup.jsp',cancelDrag);
}

// Public API
Expand Down

0 comments on commit 1039f36

Please sign in to comment.