Skip to content

Commit

Permalink
mobile fix
Browse files Browse the repository at this point in the history
  • Loading branch information
csorfab committed Sep 26, 2023
1 parent e634b41 commit ff9a897
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/handleScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ export const handleScroll = (
let availableScrollTop = 0;

do {
if (target instanceof ShadowRoot) {
target = target.host as HTMLElement;
}
const [position, scroll, capacity] = getScrollVariables(axis, target);

const elementScroll = scroll - capacity - directionFactor * position;
Expand Down

0 comments on commit ff9a897

Please sign in to comment.