Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Oct 27, 2023
1 parent 917d844 commit 709fbec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/scroller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,12 @@ export const createScroller = (
// That means we have no reliable way to confirm still touched or not if user touches more than once during momentum scrolling...
// This is a hack for the suspectable situations, inspired by https://github.com/prud/ios-overflow-scroll-to-top
if (stillMomentumScrolling) {
const prev = rootElement.style.overflow;
rootElement.style.overflow = "hidden";
stillMomentumScrolling = false;
const style = rootElement.style;
const prev = style.overflow;
style.overflow = "hidden";
timeout(() => {
rootElement!.style.overflow = prev;
style.overflow = prev;
});
}

Expand Down

0 comments on commit 709fbec

Please sign in to comment.