-
Notifications
You must be signed in to change notification settings - Fork 716
[css-ui][pointerevents] Should the scrollbar should keep responding on scrollable elements with pointer-events: none? #9001
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
Comments
I think the scrollbar should not respond on elements with
|
While I agree that this is lexically correct, I don't see why this is a strong argument about what should be done here. Especially because:
In the end, IMO, the benefits for the community seems clearly in favor of the 2nd option.
I don't see why this is related to the problem. The fact that the scrollbar is drawn aside or over the container doesn't change anything, does it? |
It does, if you have overlay scrollbars, your pointer needs to be hovering over the element for the scrollbars to show, and |
Well, at least, that makes the UI match what the user really can do |
Since a scroll container with |
When using
pointer-events: none
on a scrollable element, it is unclear if the scrollbar should respond to click. If you read those bugs reports: https://bugzilla.mozilla.org/show_bug.cgi?id=1839481 and https://bugzilla.mozilla.org/show_bug.cgi?id=880671 , you will see that the behavior has already changed twice in Firefox. Currently it doesn't respond to click.On Chrome, I didn't understand why yet, but I got different results in different cases, so I'm not sure about the current policy.
IMO, the scrollbar should respond to clicks even with
pointer-events: none
. This is because, if the dev doesn't want the user to interact with the scrollbar, they can hide it with, for instance, overflow: hidden. On the contrary, if they want to ignore the clicks on the scrollable container but still let the user interact with the scrollbar, they would be doomed. Anyway, showing a scroll bar that the user cannot use is probably a bad idea for accessibility.Here is a concrete case that can serve as an example: https://stackoverflow.com/questions/76517363/scrollbar-is-not-clickable-in-firefox-when-using-pointer-events-none
Here is a working demo illustrating my point: https://codesandbox.io/s/scrollarea-wider-with-pointer-event-clthvw
The text was updated successfully, but these errors were encountered: