This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
keep overflow, prevent events that cause scrolling (#93)
* keep overflow, calculate scroll size * check either horizontal or vertical scroll delta, not both * restore scroll position when scroll happens * scroll listener on dropdown, call refit if allowScrollOutside * normalize wheel delta * prevent scrolling keys * store EVENT_PATH on touchstart * use touches to find the deltaX/Y * restore elementIsScrollLocked, make _shouldPreventScrolling private * ensure touchstart is prevented only if happens outside the locking element * ensure touchstart is not prevented * store last touch position instead of the event * return an object scrollDeltaInfo since event.deltaX is readonly * store only scrollable nodes * avoid preventing events that are not cancelable, e.g. scroll that cannot be interrupted * fix bug on touch events, update docs * check only one axis according to where there is more scroll
- Loading branch information
1 parent
c3332bf
commit 4a00d0b
Showing
5 changed files
with
392 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.