Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone Safari does not auto scale back down on portrait->landscape->portrait
    primarykey
    data
    text
    <p>I have a very simple HTML page with this META tag for the iPhone:</p> <pre><code>&lt;meta name="viewport" content="height=device-height,width=device-width,initial-scale=1.0,user-scalable=no" /&gt; </code></pre> <p>Using the iPhone Safari, when the page loads in portrait mode it looks fine and the width fits the screen. When I rotate the iPhone to landscape mode the web page is auto resized to fit the landscape width. Good, this is what I want.</p> <p>But when I rotate back from landscape, the page is not resized back to fit the portrait width like it was before. It remains in the landscape width.</p> <p>I want the iPhone to set it back to the right width automatically, just like it did for the landscape mode. I don't think this should involve orientation listeners because it is all done automatically and I don't have any special styling for the different modes.</p> <p>Why doesn't the iPhone resize the web page back in portrait mode? How do I fix this?</p> <h2>UPDATE</h2> <p>I managed to get the iPhone to auto resize down but with a strange phenomenon of doing it only after an even number of rotations... Very very strange.<br> I use this META tag:</p> <pre><code>&lt;meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /&gt; </code></pre> <p>Here's what I have to do to get it auto resized:<br> 1. On load in portrait -> looks good.<br> 2. Rotate to landscape -> resized to fit screen.<br> 3. Rotate back to portrait -> no resize back.<br> 4. Rotate to landscape -> still in size for landscape.<br> 5. Rotate to portrait -> resized down to fit portrait screen.</p> <p>Can someone explain this behavior??<br> I still want to know how to fix this and appreciate any assistance.</p> <p>Thanks!<br> Tom.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload