# Visualviewport api below iOS 13

**URL:** <https://meta.discourse.org/t/visualviewport-api-below-ios-13/169448>\
**Category:** UX\
**Created:** [November 6, 2020, 3:40pm UTC](https://meta.discourse.org/t/visualviewport-api-below-ios-13/169448 "2020-11-06T15:40:52Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![woutervermeersch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/woutervermeersch/32/199415_2.png) [@woutervermeersch](https://meta.discourse.org/u/woutervermeersch)\
**Post date:** [November 6, 2020, 3:40pm UTC](https://meta.discourse.org/t/visualviewport-api-below-ios-13/169448/1 "2020-11-06T15:40:52Z")

</div>

Hello,

I saw that discourse somehow managed to calculate the top location of the virtual keyboard on iOS.  
This is important if you want to position something right on top of the virtual keyboard like this input field where I am typing in right now.

This is not an issue on android browser devices because position fixed elements are automatically pushed right up on the top of the visual keyboard when brought visible.

The workaround for iOS is to use the visualviewport api [https://developer.mozilla.org/en-US/docs/Web/API/Visual\_Viewport\_API](https://developer.mozilla.org/en-US/docs/Web/API/Visual_Viewport_API)  
The only problem is that there is no support for devices prior iOS 13…

I’ve tested this same input field on a device with iOS 12.1 and apparently discourse managed to replicate the desired behavior even on unsupported iOS Safari versions.

Could somebody point me in the right direction in order to achieve the same result? Would highly appreciate it 😃

Kind regards,  
Wouter Vermeersch

---

_[View the full topic](https://meta.discourse.org/t/visualviewport-api-below-ios-13/169448)._
