Reputation: 1165
Since the height of this area varies from device to device and iOS version, I'm wondering if there is any way to dynamically figure out its height to make this area more useful.
Upvotes: 1
Views: 3151
Reputation: 11
It's possible to get the height of visible content now with the VisualViewport
api (window.visualViewport.height
). Seems it's only supported by safari 13 and higher though
Upvotes: 0
Reputation: 3652
use this:
<meta name="viewport" content="user-scalable=no, width=device-width, height=device-height" />
and then the correct value can be get from window.innerWidth / window.innerHeight
Upvotes: 1
Reputation: 999
I would imaging that $(window).height()
would give you that data because it returns the height of the viewport, unless safari is being very weird/not doing as it should.
Upvotes: 0