5 ms·
How to Detect iPad Mini Using Javascript (new method)
Update: It looks like these values are reporting viewport width and height at the time of tab creation and are not updated on rotation.
- deleted 14y ago[deleted]
- konstruktors 14y agoUpdate: It looks like these values are reporting viewport width and height at the time of tab creation and are not updated on rotation.
- Tyrannosaurs 14y agoQuestion / concern here is why is it reporting this differently when in theory they should be the same? It feels like something that might be "fixed" in a future release. Unless anyone knows of a specific reason why this should be the case?
- mpetrov 14y agoSounds like it might be reserving space for the top status bar in a different orientation. Either this is a weird device specific bug or perhaps the author of the post launched Safari in a different orientation on one of the devices and then rotated (and Safari cached a different "screen" size). This is complete speculation and I don't have a device next to me to test, but the 20px difference suggests that it's referring to the black status bar at the top. Edit: looks like it might be related to tabs: http://stackoverflow.com/a/13380055/552710 http://stackoverflow.com/a/13380055/552710
- deleted 14y ago[deleted]
- tmx 14y agoJust tried it on my iPad 2 and (in portrait) got 1004x768. I couldn't get it to change with the number of tabs open.
- ankitaggarwal 14y agoI don't think it works. This is a screenshot from my iPad 2: http://i.imgur.com/eEzki.jpg http://i.imgur.com/eEzki.jpg
- paulsutter 14y agoAccording to the SO item in the other thread: "This is a detector of how many tabs are open. On my iPad 3 it reports different values when I have more than one tap open, matching the reports on the screen captures. The iPad mini screen capture has two tabs open, while the iPad 2 capture has only one. My iPad 3 reports matching values when I have one or two tabs open. – Mr. Berna 12 mins ago"