InputTextArea backspace on multiline input makes caret jump and input move upwards


Here’s the start input.


If I backspace the caret moves up one and the 5 is hidden.

If I backspace again the carret goes up one and the 4 is hidden.

Is this intended?

I was assuming backspacing an empty line would pull the other lines down and keep the caret on the bottom line.

If this is a bug could I get some help fixing it please?
Thank you!

I can’t reproduce it (tested on Chrome/Firefox/Safari).


What you are describing sounds like a controlled input issue. Are you managing the value through state (controlled) or letting the component handle it internally (uncontrolled)?

1 Like

@SimoneDev Thanks for creating the PG so I could easily test whether some sort of auto-sizing is affecting the input. I believe @Pixelodo set the autoStretchHeight of the text area to true. Check out the PG below.

In this case, the text area behaves exactly as he described. The solution is obviously to set it to false.

2 Likes

Yeah, I want it to stretch but the behavior I expected is as explained in the OP.

No, you don’t want it to stretch :smiley: What you want is set a fixed height and autoStretchHeight to false :ghost: