ios stays in landscape

318
January 08, 2017, at 10:18 PM

as I can see on the web, it's a regular issue for ios. So, I am using two different designs for mobile devices (portrait and landscape). It's working for all browsers but safari ios... For a reason that I don't know, safari stays in the landscape mode.

I have tried to set the following code :

            if (window.matchMedia("(orientation: portrait)").matches) {
               alert('portrait');
            }
            if (window.matchMedia("(orientation: landscape)").matches) {
               alert('landscape');
            }

But whatever the orientation of the iphone, I see the alert 'landscape'. I add that the page is in an iframe and that I have already added the viewport tag

Do you know how to fix this issue ? Thanks a lot for your help.

READ ALSO
Progress Bar Bootstrap - Mobile & Desktop

Progress Bar Bootstrap - Mobile & Desktop

I am using vertical progress bar which works fine on desktop but I want to change back to horizontal on mobile which is also working fine by removing "progress-bar-vertical" class from below div only on mobile

309
I am having trouble adding an input to find words in element [on hold]

I am having trouble adding an input to find words in element [on hold]

I found this code which would find a word in an elementI tried to add an input to it, so I could type a word that I wanted to find

306
How to fix Arabic Font in Safari and FireFox?

How to fix Arabic Font in Safari and FireFox?

I have a font that is @import from google fonts in my css file

340
Change an !important property using JavaScript/jQuery

Change an !important property using JavaScript/jQuery

So I've already got the text color of a select box set with an !important value and am struggling to change it again using jQuery

352