Skip to content

Commit

Permalink
fix: Propogation of Scroll Events when Scroll Position is at a Bounda…
Browse files Browse the repository at this point in the history
…ry (#2166)

Closes #2101
  • Loading branch information
AkshatJawne authored Jul 30, 2024
1 parent 5b06ecc commit cb72d29
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/grid/src/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2039,10 +2039,16 @@ class Grid extends PureComponent<GridProps, GridState> {
}
}

this.setViewState({ top, left, leftOffset, topOffset });

event.stopPropagation();
event.preventDefault();
if (
metrics.top !== top ||
metrics.left !== left ||
metrics.topOffset !== topOffset ||
metrics.leftOffset !== leftOffset
) {
this.setViewState({ top, left, topOffset, leftOffset });
event.stopPropagation();
event.preventDefault();
}
}

/**
Expand Down

0 comments on commit cb72d29

Please sign in to comment.