Ever since I switched to Chrome (10) and Safari (5.0.4) I've noticed that often, when I'm typing in a textarea, a horizontal scrollbar appears when the text I'm typing should be wrapped to the next line instead. When this happens, it's not until I type another letter that the scrollbar disappears and the text wraps as it should. I think the best way to explain this is with an example. (It took a bit of time for me to figure out how to reliably reproduce this by the way.) I should note that the problem happens on many different websites with textareas of varying widths and different text inside the textarea. If you: 1. Open up the example HTML page attached (which is just a simple textarea with a width of 630 pixels, and a height large enough to contain at least two lines of text) 2. Type (or copy and paste) the following bit of text twice so that each is on a separate line: was in the 90s doesn't mean there's no room for a new promotion either or that 3. Press space ... then a horizontal scrollbar will appear. I've also attached a screenshot showing what it looks like after I press space on my system. The font shown is Courier New, size 12, and I'm using Windows 7. If you use a different font/size you'll probably have to play with the textarea width and maybe even the actual text inside too. Two things I noticed: 1) If you only copy and paste or type that line once and then press space, the problem doesn't seem to occur. 2) If you type several lines of gibberish, and then copy+paste or type that line once on its own line, the problem does occur. One final thing: this may be related to bug #55970, I'm not sure.
Created attachment 85897 [details] Demo HTML page
Created attachment 85898 [details] Screenshot of what the issue looks like on my system
Sorry, that's Courier New size 10, not 12. Default on Win7 I'm pretty sure. I have experienced the issue on sites like reddit, though, where the textarea font is different (Verdana?).
Bug still exists in Chrome 16.
I have started analysing this issue. This is happening due to trailing spaces at the end of the lineBreaker. In BreakingContextInlineHeaders.h , handleText() API a check is added if (!m_width.fitsOnLineIncludingExtraWidth(charWidth)) . In this just setting the position of lineBreaker and renderer will do. Trailing whitespaces needs to be removed to set the space at the end of line in text area.
I am not able to reproduce this bug in Safari 16.2 and Safari Technology Preview 160 and does not get any horizontal scrollbar. Appreciate if someone else can confirm and then we can mark this as "RESOLVED CONFIGURATION CHANGED" or "RESOLVED WONTFIX". Thanks!