Answer the question
In order to leave comments, you need to log in
How to disable auto zoom when changing the orientation of the mobile device?
Hello!
When writing a mobile version of the site, a problem arose that has not been resolved for several months - when the device orientation is changed from portrait to landscape, automatic zoom is triggered, which I would like to get rid of. At the same time, when loading the page in any device orientation and when changing the orientation from landscape to portrait, this does not happen.
The page is tested in Chrome.
The device is a Samsung GT-I9082 mobile phone. The model, of course, is old, but it is unlikely that this is the case.
Browser - Android 4.2.2
Viewport is set as name="viewport" content="width=device-width, initial-scale=1.0, target-densitydpi=device-dpi". Attempts to limit the minimum or maximum scale value result in image distortion.
I would be very grateful for a hint of a working and as simple as possible solution, if possible in js or css.
Sincerely,
Pavel
Answer the question
In order to leave comments, you need to log in
Rather, the question is - did you try to remove the target-densitydpi=device-dpi"? And can you make an example on jsfiddle or codepen? I don’t quite understand what this zoom looks like.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question