After upgrading my iOS devices to iOS 8.3, I noticed some strange behavior with the property of the original meta-definition scale. If I set the initial scale to 1.0 and rotate my device while I am on the web page, all the content will gradually decrease and, in the end, the browser will work.
I noticed that the amount of how much less content with each orientation change is related to how much you set the initial scale. For example, if I set the value to 0.9, the content will get 10% less each time. If I set it to 0.6, the content will get 40% less each time.
Due to the nature of this error, it cannot be set or tested on jsfiddle. Instead, I will insert the code right here so you can check it somewhere somewhere:
<!doctype html> <html> <head> <title>initial scale under 1.0</title> <meta name="viewport" content="width=device-width, initial-scale=0.7, user-scalable=0" /> </head> <body> <div id = "wrapper"> <h1>Hello, run this page on iOS 8.3 device and change the orientation multiple times to make this text go smaller and eventually crash the browser!</h1> </div> </body> </html>
You can compare this broken example with a working one, which has an initial scale set to 1.0:
<!doctype html> <html> <head> <title>initial scale 1.0</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0" /> </head> <body> <div id = "wrapper"> <h1>This text will not get smaller nor will the browser crash when you rotate your device multiple times!</h1> </div> </body> </html>
Before switching to iOS 8.3, the rotation of the device worked fine. The layout cannot be reduced or deleted, nor can the browser crash after several orientation changes.
Is there any way to fix this problem?