Skip to content

Commit

Permalink
fix: revert #674 and disable v scrolling only where options.autoHeigh…
Browse files Browse the repository at this point in the history
…t is

true. Fixes #711
  • Loading branch information
6pac committed Nov 9, 2022
1 parent 71bfd9a commit b156cfb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions slick.grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4382,9 +4382,6 @@ if (typeof Slick === "undefined") {
}

function handleScroll() {
// autoheight does not have scrolling, but editors can trigger a scroll, which we should ignore
if (options.autoHeight) return;

scrollTop = $viewportScrollContainerY[0].scrollTop;
scrollLeft = $viewportScrollContainerX[0].scrollLeft;
return _handleScroll(false);
Expand Down Expand Up @@ -4439,7 +4436,8 @@ if (typeof Slick === "undefined") {
}
}

if (vScrollDist) {
// autoheight does not have scrolling, but editors can trigger a scroll, which we should ignore
if (vScrollDist && !options.autoHeight) {
vScrollDir = prevScrollTop < scrollTop ? 1 : -1;
prevScrollTop = scrollTop;

Expand Down

0 comments on commit b156cfb

Please sign in to comment.