Skip to content
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

Enable mouse click and drag to scroll and other pointer behavior customizations #512

Open
flackr opened this issue Aug 14, 2024 · 0 comments
Labels

Comments

@flackr
Copy link
Contributor

flackr commented Aug 14, 2024

I originally mentioned this in #203 (comment) and it was independently requested in w3c/csswg-drafts#9811. There are many interfaces for which clicking and dragging should scroll just like touching down and moving. E.g. a scroll snap carousel-like scrolling element such as https://gui-challenges.web.app/carousel/dist/

For this, I think we should have a way to make mouse click and drag behave as a direct manipulation device. As a strawman example, perhaps we could consider:

/* Defines that all of touch mouse and stylus should be treated as direct manipulation devices. */
pointer-manipulation: touch mouse stylus

It's worth also considering whether the same property should allow for treating the default input behavior in different ways. For example, while stylus is a direct manipulation device, sometimes when touching down and moving near input fields it writes into that input field. We could consider whether such a property should allow for making a stylus still scroll instead of write. E.g. one idea is that pointer-manipulation: auto allows for the UA to do additional actions like allow stylus writing but if you set pointer-manipulation: stylus it must treat it as a manipulation / scroll?

Another request I've heard is allowing for stylus to behave as a mouse, i.e. perform text selection. I'm not sure if the same property could be used or some other convention would be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants