When the window width is less than the document with, left: N px is calculated incorrectly. The result of this bug is that the scrolling element jumps out of its rails when the user scrolls horizontally.
Here's a GIF to visually describe the issue:
I was able to fix this issue with [snip]:
sidebarSectionTop.fixTo('.sidebar-section-top-track', options);
sidebarSectionMiddle.fixTo('.sidebar-section-middle-track', options);
var lastScrollLeft = 0;
// Redraw sticky sidebar when scrolling laterally on constrained viewports
// fixTo ends up with an incorrect "left: N; position: fixed", and needs
// to be recalculated
$(window).scroll(function(){
// If the document is less than or equal to window, no side scroll
if ( $(document).width() <= $(window).width() ) {
return;
}
var documentScrollLeft = $(document).scrollLeft();
if ( lastScrollLeft != documentScrollLeft ) {
lastScrollLeft = documentScrollLeft;
sidebarSectionTop.fixTo('refresh');
sidebarSectionMiddle.fixTo('refresh');
}
});
12 might be the same issue. Not sure whether I expect this to be supported by the library directly, but I thought it'd be worthwhile to report.
When the window width is less than the document with,
left: N px
is calculated incorrectly. The result of this bug is that the scrolling element jumps out of its rails when the user scrolls horizontally.Here's a GIF to visually describe the issue:
I was able to fix this issue with [snip]:
12 might be the same issue. Not sure whether I expect this to be supported by the library directly, but I thought it'd be worthwhile to report.