[pointerevents] Enable mouse click and drag to scroll and other pointer behavior customizations (#512)

flackr has just created a new issue for https://github.com/w3c/pointerevents:

== Enable mouse click and drag to scroll and other pointer behavior customizations ==
I originally mentioned this in https://github.com/w3c/pointerevents/issues/203#issuecomment-819693123 however I think it may be sufficiently different that it should have its own issue. 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](https://w3c.github.io/pointerevents/#declaring-direct-manipulation-behavior). As a strawman example, perhaps we could consider:
```css
/* 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.

Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/512 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 14 August 2024 14:07:11 UTC