[pointerevents] WheelEvent.intDelta(X|Y|Z) might be useful for some web apps which cannot scroll its contents smoothly (#589)

masayuki-nakano has just created a new issue for https://github.com/w3c/pointerevents:

== WheelEvent.intDelta(X|Y|Z) might be useful for some web apps which cannot scroll its contents smoothly ==
When I work on reimplementing legacy mouse scroll event handlers to standardized wheel event handles, I thought that if there are WheelDelta.intDelta(X|Y|Z) or something, some web apps may handle wheel events easier.

My proposal is, WheelEvent.intDelta(X|Y|Z) is set to an non-zero integer value when accumulated delta value is over 1 or less -1, sets the corresponding intDelta value to the integer and remove the value from accumulated delta value.

For example, when a device causes scrolling 0.4 lines per event:

1. deltaY: 0.4, intDeltaY: 0 (accumulated deltaY: 0.4)
2. deltaY: 0.4, intDeltaY: 0 (accumulated deltaY: 0.8)
3. deltaY: 0.4, intDeltaY: 1 (accumulated deltaY: 0.2)

when a device causes scrolling 1.5 lines per event:

1. deltaY: 1.5, intDeltaY: 1 (accumulated deltaY: 0.5)
2. deltaY: 1.5, intDeltaY: 2 (accumulated deltaY: 0.0)

When user reverse the delta direction, accumulated delta should be recounted from 0:

1. deltaY: 0.4, intDeltaY: 0 (accumulated deltaY: 0.4)
2. deltaY: 0.4, intDeltaY: 0 (accumulated deltaY: 0.8)
3. deltaY: -0.4, intDeltaY: 0 (accumulated deltaY: -0.4)
4. deltaY: -0.4, intDeltaY: 0 (accumulated deltaY: -0.8)
5. deltaY: -0.4, intDeltaY: -1 (accumulated deltaY: -0.2)

This may be useful if web apps implements listbox or treeview which scrolls per its item.

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


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

Received on Monday, 12 January 2026 22:03:12 UTC