Surface Pro
Image Courtesy: Microsoft

Last year Microsoft announced that it plans to become a significant contributor to the Chromium project. The firm’s contributions could benefit all browsers like new Edge and Google Chrome on Windows 10 and even other platforms.

In addition to improvements for mouse scrolling performance, Microsoft is now also looking into Chromium’s weird pinch-zoom behaviour on some Windows 10 devices such as the Surface Pro and Surface Book.

According to a months-old bug post, users cannot prevent pinch-zoom gesture on a Windows 10 device like Surface Pro with the touchpad. The bug can be reproduced on some webpages when you try to pinch to zoom with two fingers, and move a finger away from the touchpad centre point and still have one finger on the location.

As a user explains, you won’t be able to prevent pinch-zoom gesture in the following case:

  • Place cursor over the “Real prevent default handler” scroller
  • Do a fast touchpad fling (note, the scroller won’t actually scroll).
  • Immediately perform a pinch zoom gesture.

According to a Microsoft engineer, it’s easier to reproduce this behaviour on Surface devices, though it could be also experienced on MacBook 2016 and MacBoook Pro 2018.

“It’s hard to reproduce intentionally. During work, a bug occurs 5 times per day. Also error is not reproduced on every computer. I’m facing it on MacBook 2016 and MacBook Pro 2018 13 inch sans touch bar,” the engineer noted. “According to my subjective feelings, it’s easier to reproduce on Surface Book Pro”.

According to a commit, Microsoft has a solution to correctly ‘preventDefault’ pinch zoom.

The commit, which is marked ‘active’, states that the pinch-zoom was incorrectly not being preventDefault’d sometimes.

“In two different scenarios: either the transition from scroll->pinch, or from fling->pinch,” the proposal reads. “This CL fixes this by checking the event that was being ACK’d vs the event that TPEQ expects an ACK for, and if they don’t match then it early outs and ignores the ACK.”

According to another commit, Microsoft wants to dispatch scroll end event immediately when a fling isn’t going to happen.

“Now with this change, if we are transitioning from a scroll to a pinch, the momentum_phase of an event is set to Blocked, signalling that a momentum scroll will not happen. We then immediately dispatch the end event without waiting,” Microsoft noted.

This change also contributes to Chromium’s pinch-zoom issue fix.

The bug post has been marked fixed and it is likely that the solution will land in an upcoming release.

About The Author

Mayank Parmar

Mayank Parmar is an entrepreneur who founded Windows Latest. He is the Editor-in-Chief and has written on various topics in his seven years of career, but he is mostly known for his well-researched work on Microsoft's Windows. His articles and research works have been referred to by CNN, Business Insiders, Forbes, Fortune, CBS Interactive, Microsoft and many others over the years.