We have necessity to do something before the web page is zoomed in or out in Safari on iOS. Is it possible?
There are two cases when interface is zoomed - when user does a zooming gesture and when user clicks an input element. While first might be possible to detect by listening to a gesture event (probably), what about second?
And how to tell if the page is scaled at all?
When you zoom in, window.innerWidth is adjusted, but document.documentElement.clientWidth is not, therefore:
zoom = document.documentElement.clientWidth / window.innerWidth;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With