window.innerHeight - Twitter bug or iOS bug?


Here is a tweet I posted that includes a link which displays an enhanced google map. I developed the Gmap4 software that displays the map.

If you open the map using an iPhone or iPad then you will see one control button in the lower right corner labeled “Menu”.

If you open the exact same map using the following direct link then you will see two control buttons in the lower right corner.

Problem: window.innerHeight is set to too large of a value when the map is opened from the tweet and displayed by twitter’s embedded browser.

I do not know if the same problem exists on Android devices.

My code determines the height of the map on the user’s screen by looking at window.innerHeight. The two control buttons are then placed so many pixels up from the bottom of the map.

Who is responsible for determining the writeable height of the user’s screen? Is that the responsibility of twitter’s embedded browser or the responsibility of iOS?

Would I go down the road to certain ruin if I adjusted my code based on detecting the twitter user agent string?


Unfortunately I’m unable to view the Tweet since the account is protected. Are you posting a web URL with a card, or an actual image in the Tweet? Or is the issue simply that the Safari WebView is not displaying the website as expected?


I unprotected my account and posted a new tweet with a map link for the Hermine storm going on now. The map link is in the body of the tweet.

Yes, the website (i.e. the map) is not displaying as expected.

My first post described the exact problem.
Similar map links on Facebook work fine.


OK. I understand. Thanks for the report, I’ll pass it along. Unfortunately we can’t provide direct support for the issue here as it is not related to the developer platform, just the iOS mobile app, but I’ll tell the team that you raised this question.