3

Is it possible to create an html element (let's say div) which will have responsive height and will be covered by enabled keyboard?

I have following situation:

enter image description here

And I'd want to have this div to be scrollable like that

enter image description here

I know I could do that by setting height of div to specifix px value but I'd want it to look the same on different mobile devices. I've tried to use vh but as I understand it corresponds to viewport height which is different with enabled keyboard. Is it possible to make viewport sizes not changable?

kebie
  • 485
  • 5
  • 16

1 Answers1

0

No. The virtual keyboard is not HTML and is not in the DOM -- it's an operating-system level component and your page doesn't even know it exists.

Managing application layout is very difficult with the virtual keyboard unless you're building a native app. In that case the app can control the visibility of the keyboard and adjust its layout accordingly. On a normal web page this is virtually impossible.

Diodeus - James MacFarlane
  • 112,730
  • 33
  • 157
  • 176