---
title: "Discussion on \"How to make fixed elements respect the virtual keyboard on iOS\" | Hashnode"
description: "Discussion on \"How to make fixed elements respect the virtual keyboard on iOS\". Apple likes to \"think different\" (and tell us about it too).\nSometimes this leads to cool stuff, and other times it results in position: fixed elements that get hidden behind the virtual keyboard on iOS... No matter how hard you try to coerce them ot..."
url: "https://hashnode.com/posts/how-to-make-fixed-elements-respect-the-virtual-keyboard-on-ios/647bb9831756f7cb2bd8e2cb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to make fixed elements respect the virtual keyboard on iOS](https://saricden.com/how-to-make-fixed-elements-respect-the-virtual-keyboard-on-ios?utm_source=hashnode&utm_medium=feed)

Apple likes to "think different" (and tell us about it too). Sometimes this leads to cool stuff, and other times it results in position: fixed elements that get hidden behind the virtual keyboard on iOS... No matter how hard you try to coerce them ot...

Jun 3, 2023 · 2 min read · saricden.com  
Read the article

-   [#web-development](https://hashnode.com/tag/web-development)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#css](https://hashnode.com/tag/css)
-   [#html5](https://hashnode.com/tag/html5)

## Written by

[Kirk Morris](https://hashnode.com/@saricden)

@saricden

  
[View profile](https://hashnode.com/@saricden)

Indie game dev who (b||v)logs about it.

## Responses 5

Markdown supported · ⌘↵ to post

[Simon](https://hashnode.com/@Simo5)

[Jun 18, 2024](https://hashnode.com/posts/how-to-make-fixed-elements-respect-the-virtual-keyboard-on-ios/647bb9831756f7cb2bd8e2cb/comment/6671060accebf14a47f5d7c1)

I was really hopeful that your code example would work, but unfortunately it fails quite horribly on iOS Safari once the keyboard is opened up. The div that should be fixed to the bottom ends up all over the place - sometimes out of view, and sometimes in the center of view.

Here's the example: simoneast \[dot\] net/TEMP/keyboard-viewport-example/ (tap on the input box to activate the keyboard)

Unfortunately this appears to be very difficult to fix without introducing stuttering and glitchyness. If you have any other suggestions or discoveries, I would love to know.

(I'm testing on iOS 17.4.1)

[Karel Čančara](https://hashnode.com/@kacan)

[May 14, 2024](https://hashnode.com/posts/how-to-make-fixed-elements-respect-the-virtual-keyboard-on-ios/647bb9831756f7cb2bd8e2cb/comment/664354562d3a079fdc0d3139)

Thank you! Very helpful <3

[Piyali Debroy](https://hashnode.com/@piyalidebroy)

[Oct 20, 2023](https://hashnode.com/posts/how-to-make-fixed-elements-respect-the-virtual-keyboard-on-ios/647bb9831756f7cb2bd8e2cb/comment/6532198b9e28a744a3598422)

Good information

[Kavir Kaycee](https://hashnode.com/@kavir)

[Jun 6, 2023](https://hashnode.com/posts/how-to-make-fixed-elements-respect-the-virtual-keyboard-on-ios/647bb9831756f7cb2bd8e2cb/comment/647f2f457fef2032a2440f12)

Good read!

[Kirk Morris](https://hashnode.com/@saricden)

[Jun 7, 2023](https://hashnode.com/posts/how-to-make-fixed-elements-respect-the-virtual-keyboard-on-ios/647bb9831756f7cb2bd8e2cb/comment/647f2f457fef2032a2440f12#reply-64802b437fef2032a24428fd)

Thank you Kavir :)

[Nakam](https://hashnode.com/@Nakamcode)

[Jun 5, 2023](https://hashnode.com/posts/how-to-make-fixed-elements-respect-the-virtual-keyboard-on-ios/647bb9831756f7cb2bd8e2cb/comment/647e3ead1147de02efa75630)

This is very insightful mate

[Kirk Morris](https://hashnode.com/@saricden)

[Jun 6, 2023](https://hashnode.com/posts/how-to-make-fixed-elements-respect-the-virtual-keyboard-on-ios/647bb9831756f7cb2bd8e2cb/comment/647e3ead1147de02efa75630#reply-647e7abb1147de02efa75988)

Thanks Nakam 😄

[Byron.C](https://hashnode.com/@Lapwell)

[Jun 3, 2023](https://hashnode.com/posts/how-to-make-fixed-elements-respect-the-virtual-keyboard-on-ios/647bb9831756f7cb2bd8e2cb/comment/647bbc419cbca907ec2b32b9)

I loathe apple for: overpriced hardware

i like apple for: 404

[Kirk Morris](https://hashnode.com/@saricden)

[Jun 3, 2023](https://hashnode.com/posts/how-to-make-fixed-elements-respect-the-virtual-keyboard-on-ios/647bb9831756f7cb2bd8e2cb/comment/647bbc419cbca907ec2b32b9#reply-647bbc619cbca907ec2b32c1)

Hahaha spoken like a true Linux man.

[Alademehin Oloruntobi](https://hashnode.com/@TobiramaSan)

[Jun 4, 2023](https://hashnode.com/posts/how-to-make-fixed-elements-respect-the-virtual-keyboard-on-ios/647bb9831756f7cb2bd8e2cb/comment/647bbc419cbca907ec2b32b9#reply-647c61799cbca907ec2b3c6a)

😂😂good one
