-
Notifications
You must be signed in to change notification settings - Fork 666
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
[css-ui-4] pointer-events should have a filtering capability #6280
Comments
I believe Therefore, it somewhat makes sense to me to extend that property to filter the events it handles. An important question is how fine-grained the control should be that authors have over events. E.g. does it make sense to allow hover events, pass through move events and stop any other events? Do people want to pass through pointer down events but stop pointer up events? Sebastian |
As a web developer, my use case is a simple css scroll snap carousel with left/right buttons on desktop. (Example: https://snap.glitch.me/carousel.html) If the user is hovering over the left/right buttons while attempting to scroll, it doesn't scroll the carousel. (This is worse if the buttons are touch friendly/bigger.) Even worse, on horizontal scroll views on a Mac, this causes horizontal scroll to be redirected to the document root which causes the browser to navigate (forward/back). Workarounds I've tried:
At this point, there's no good solution. This is made worse by there being no way to determine if the user is interacting with a touchpad or via a mouse - so I can't just remove the buttons if the user has a touchpad. Solution
Thank you for your consideration. |
Once #4438 has the currently implemented version of
pointer-events
added to css-ui, we should take a look at the feature requests in https://wiki.mozilla.org/SVG:Pointer-events and our own issue list. One item on the Mozilla wiki isThere is also a request in #4499 to have a value that just stops events (instead of passing them through). I think it would be useful to combine these ideas and allow a CSS declaration that declares which events are handled, which are passed through, and which are stopped.
The particular case that led me to opening this issue is an overlay where we want it to respond to hover events, but have click events pass through to the element underneath.
The text was updated successfully, but these errors were encountered: