input-device-capabilities icon indicating copy to clipboard operation
input-device-capabilities copied to clipboard

Add property for whether dragging the pointer scrolls

Open RByers opened this issue 9 years ago • 5 comments

In the Pointer Events hackathon it was discussed that there's no good way to know if a user would expect a pointermove event to trigger scrolling. Eg. for a library trying to implement a custom scroller that behaves like the native OS scrollers (eg. iScroll). A naive thing to do is to trigger scrolling for pointerType="touch" only, but that won't handle the case of touch-like stylus devices (eg. Samsung SPen).

We should just add a new property to InputDeviceCapabilities that indicates whether this is a pointer where movement typically causes scrolling. For chromium this will probably always have the same value as firesTouchEvents.

/cc @scottgonzalez @jacobrossi @mustaqahmed @dtapuska @tdresser

RByers avatar Jul 28 '16 17:07 RByers

Probably the main question here is what the property name should be. Ideas:

  • draggingScrolls
  • pointerMovementScrolls
  • scrollByDragging

RByers avatar Jul 28 '16 17:07 RByers

Should the name be specific to scroll? Or should it also refer to whether pointers can cause zoom?

tdresser avatar Jul 28 '16 18:07 tdresser

I think it should be scroll-specific. Eg. I think the SPen can scroll but not zoom (and if not, certainly it would be reasonable for some pens to act that way).

RByers avatar Jul 29 '16 19:07 RByers

Note that it's tempting to describe this as "is direct manipulation" - i.e. is the input metaphor one where the user is directly grabbing things on the screen. I think I'll put some text like that in the prose, but IMHO it's probably best to keep the property name very concrete around a specific capability.

RByers avatar Aug 02 '16 15:08 RByers

Let's leave this issue open until there's been some more discussion and the tests and polyfill have been updated (not something I expect to do before I get back from vacation late Aug).

RByers avatar Aug 02 '16 17:08 RByers