Re: [w3c/uievents] [Proposal] Add "Zoom" event (#31)

GeeLaw left a comment (w3c/uievents#31)

There are two kinds of zooms --- pinch zoom (continuous) and leveled zoom. CSS acknowledges that pinch zoom does not change view port size (like getting close to a paper), and leveled zooming in will make the view port smaller (enlarging a logical pixel).

When Windows first introduced precision touch support in Windows 8, the "mousy" input devices have two categories (I'm not sure if there is an official documentation, but I just observed as a user):

1. Mouse and (traditional, non-precision) touch pad.
2. Touch screen and precision touch pad.
3. Stylus.

Category 1 shares the following common behaviors:

- Scrolling is non-continuous. Zooming is leveled.
- The action of wheel or touch pad right edge reflects the action applied on scrollbars. (Pulling the wheel towards oneself makes things below into view.)

Category 2 shares these:

- Panning (scrolling) is "continuous". Zooming is pinch.
- The action of panning is applied to the canvas, hence backwards when compared with scrollbars. (Pulling the finger up makes things below into view.)

Chromium firing `wheel` events with Ctrl held in response to precious touch pad pinch is sacrilegious. Because a true Ctrl + wheel brings leveled zoom, changes the view port size, but a precision touch pad pinch brings pinch zoom, does not change the view port size. Confusing the two is driving me crazy (which is also why I found this issue raised by you :-).

I also tried touch screen on Chromium. When I pinch the screen, it doesn't fire `wheel` events.

My advice is to deprecate the behavior of firing `wheel` events in response to pinch zoom.

---

A leveled zoom changes `window.devicePixelRatio`. A pinch zoom does not. If we will have an event for the zooms, we need two, differentiating two kinds of zooms.

Whether we want to differentiate the source of each zoom, I think `InputDeviceCapabilities` is on the right track.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/31#issuecomment-2856918932
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/uievents/issues/31/2856918932@github.com>

Received on Wednesday, 7 May 2025 03:33:51 UTC