I'd like to use one-line textarea
(with rows=1
and overflow-x:hidden;
) but for now I have a problem: unlike input type="text"
, when it is overflown horizontally, the content is scrolled with "jumps" when we continue typing inside it:
which is not nice for typing workflow (see also a fiddle). Is there some simple way to fix this (ideally with just CSS), or the only way is to set an on('input',..)
handler, check if we reached the end of the line inside it by some pesky pixel calculation and then set horizontal scroll position of the textarea
?