5
  1. Editable html element takes 100% of a screen's height.
  2. On element focus a virtual keyboard comes up and covers partly element in Safari.

How to tell element by CSS/JavaScript to take 100% of visible height = 100vh - keyboard height ?

enter image description here

Anton Arbus
  • 61
  • 2
  • 6
  • 1
    [https://stackoverflow.com/questions/23023549/get-viewport-height-when-soft-keyboard-is-on](https://stackoverflow.com/questions/23023549/get-viewport-height-when-soft-keyboard-is-on) does this help? – GhostPengy Nov 12 '21 at 14:30
  • Shame on me, the answer is really in your link. Last time I checked it was not there. Thank you! – Anton Arbus Nov 12 '21 at 15:28

1 Answers1

0

It seems to be the duplicate to this question and as Nathan Manousos commented

window.visualViewport.height

can help to find the actual visible content height on a phone.

Thanks GhostPengy for pointing.

Anton Arbus
  • 61
  • 2
  • 6