Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding Issue #313 #314

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion script/jquery.jscrollpane.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@
(parseInt(elem.css('paddingRight'), 10) || 0);
}

// Workaround for #313 to prevent the scrollbars from being sticky if containing elements stop the propagation of the events
elem.bind('mouseup.jsp',cancelDrag);

function initialise(s)
{

Expand All @@ -112,7 +115,7 @@
maintainAtBottom = false, maintainAtRight = false;

settings = s;

if (pane === undefined) {
originalScrollTop = elem.scrollTop();
originalScrollLeft = elem.scrollLeft();
Expand Down Expand Up @@ -284,6 +287,9 @@
verticalTrack = verticalBar.find('>.jspTrack');
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.jsp', function(){$(document).mouseup();});

if (settings.showArrows) {
arrowUp = $('<a class="jspArrow jspArrowUp" />').bind(
'mousedown.jsp', getArrowScroll(0, -1)
Expand Down Expand Up @@ -382,6 +388,9 @@
horizontalTrack = horizontalBar.find('>.jspTrack');
horizontalDrag = horizontalTrack.find('>.jspDrag');

// Workaround for #313 to prevent infinite loop in initClickOnTrack() if containing elements stop the propagation of the events
horizontalTrack.bind('mouseup', function(){$(document).mouseup();});

if (settings.showArrows) {
arrowLeft = $('<a class="jspArrow jspArrowLeft" />').bind(
'mousedown.jsp', getArrowScroll(-1, 0)
Expand Down Expand Up @@ -1225,6 +1234,7 @@
if (reinitialiseInterval) {
clearInterval(reinitialiseInterval);
}
elem.unbind('mouseup.jsp',cancelDrag);
}

// Public API
Expand Down