E
E
Evgeny Popov2011-04-06 05:47:09
css
Evgeny Popov, 2011-04-06 05:47:09

Height of textarea on android (ios)?

What are the ways to set the vertical size (height) of the active textarea block, taking into account the open virtual keyboard on the web page?
So that, if possible, the textarea does not go beyond the border of the screen and does not overlap with the keyboard.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arthur Koch, 2011-04-06
@dudeonthehorse

$('textarea').css('height', $(window).height() + 'px');
We apply it both when loading a document and when resizing the window.
I understand correctly that when the on-screen keyboard appears, in fact, the height of the visible area changes?

K
Kirill Dlussky, 2011-04-06
@Dlussky

IMHO, 90% of users open the keyboard by clicking on the textarea. It would be logical, it seems to me, to hang resizing on getting focus)
Well, if it jumps, add also scroll (), or what is it called in jquery? ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question