Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pinch to zoom doesn't work on macOS (Chrome) when fullscreen is triggered using the Fullscreen API

On macOS, it's possible to use the gesture "pinch to zoom" with the trackpad to zoom onto a page.

This feature works correctly on Chrome when the page is not in fullscreen. It also works correctly when triggering the fullscreen using the upper-right green button of the Chrome window.

However, when triggering the fullscreen programatically using the HTML5 Fullscreen API (webkitRequestFullscreen -- https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API), the "pinch to zoom" gesture is disabled.

It's possible to test this out here: when triggering fullscreen using the upper-right green button, "pinch to zoom" works; when using the "Request document", it won't work.

It seems like there are two different fullscreen mode on macOS, but it's hard to find any information on it.

like image 370
Jonathan Alzetta Avatar asked Oct 15 '25 05:10

Jonathan Alzetta


1 Answers

This seems to be intentional behaviour, at least on Mobile. See the discussion at https://bugs.chromium.org/p/chromium/issues/detail?id=736520.

Generally, pinch to zoom is meant for legacy websites. If you want some zooming capability in a fullscreen gallery, you will have to code it yourself.

like image 88
hmu Avatar answered Oct 17 '25 02:10

hmu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!