-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gesture issues #7075
Comments
Following! |
I closed #7066. I am imagining an implementation like this: As a developer, I would like to ability to freeze/prevent scrolling of a particular scroll view, or even the entire app. The use case would be something like drag and drop, or even when swiping open an The ideal implementation allows a "ScrollDelegate" or something similar instance to be injected into component that lets the user call operations on it.
I am imagining an API that looks like this. Thanks, |
There are several issues related with events listeners and collision of gestures in Ionic 2 that should be fixed in order to provide the best UX experience closest to a native app.
At first, I am going to enumerate them, and then propose several solutions to each one. I think we should always try to fix it using native JS/CSS apis whenever it's possible.
Preventing scrolling in ion-content
It is desired to block scrolling when the following gestures are recognised:
Gesture collision
Performance
We should try to avoid fullscreen touchmove/mousemove listeners that can prevent optimus scrolling performance.
#7049
Future
Solutions
Scrolling
To prevent scrolling is required to call
preventDefault()
ontouchstart
,mousedown
or firstscroll
event, this is not always possible since severaltouchmove/mousemove
events are required before a panx can be recognised:touch-action
can help in Range, blocking scrolling only when the user is in fact dragging the range.ion-backdrop
to block scrolling.https://github.com/driftyco/ionic/blob/a1a582b7a10e641e6f2e1dd0f2937c85db82394d/src/components/backdrop/backdrop.ts#L21-L23
ScrollManager: #7066
Gesture collision
Same problem, swipe gestures need several events in order to be detected.
#6726
The text was updated successfully, but these errors were encountered: