If you have a <textarea>
with a lot of text (i.e. more than twice the height of the textarea), when the user inserts a newline in the middle, Chrome scrolls the text such that the cursor is at the top of the <textarea>
. This behavior is disorienting for the user, as they must manually scroll the textarea in order to bring content from above back into view. Neither Firefox nor Safari has this behavior.
Steps to reproduce:
- Create a
<textarea>
- Paste a lot of text into it
- Put the cursor in the middle of the text
- Press Enter
Expected behavior: The relative position of the cursor in the textarea remains the same.
Actual behavior: The text scrolls such that the cursor is at the top of the text area.
To reiterate, this behavior does not occur with Safari or Firefox. It's specific to Chrome.
Is there any way to suppress this behavior in Chrome and get it to behave more like Firefox and Safari?