File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -113,11 +113,15 @@ export const handleScroll = (
113
113
( targetInLock && ( endTarget . contains ( target ) || endTarget === target ) )
114
114
) ;
115
115
116
- if ( isDeltaPositive && ( ( noOverscroll && availableScroll === 0 ) || ( ! noOverscroll && delta > availableScroll ) ) ) {
116
+ // handle epsilon around 0 (non standard zoom levels)
117
+ if (
118
+ isDeltaPositive &&
119
+ ( ( noOverscroll && Math . abs ( availableScroll ) < 1 ) || ( ! noOverscroll && delta > availableScroll ) )
120
+ ) {
117
121
shouldCancelScroll = true ;
118
122
} else if (
119
123
! isDeltaPositive &&
120
- ( ( noOverscroll && availableScrollTop === 0 ) || ( ! noOverscroll && - delta > availableScrollTop ) )
124
+ ( ( noOverscroll && Math . abs ( availableScrollTop ) < 1 ) || ( ! noOverscroll && - delta > availableScrollTop ) )
121
125
) {
122
126
shouldCancelScroll = true ;
123
127
}
You can’t perform that action at this time.
0 commit comments