Summary: Pasting text that ends with a newline, then immediately deleting that newline, results in a discontinuity in a <textarea> element. Steps to Reproduce 1. Load URL: <data:text/html,%3ctextarea%3e%3c/textarea%3e> 2. Resize. 3. Type in "lorem\n\n\n\nipsum\n" (hit the Enter key for each newline). 4. Select "lorem" plus its ending newline and copy to pasteboard. 5. Position insertion bar on line 3 (blank line between "lorem and ipsum"). 6. Paste text. 7. Immediately hit Delete key. Expected Results: Blank line should be deleted after pasting "lorem\n". Actual Results: Blank is deleted, but the text is not redrawn with the line removed. Moving the insertion bar with left/right arrow keys will show it jump over the deleted newline. (Using up/down arrow keys will actually not move the insertion bar past the deleted newline.) Regression: Via bisection, this regressed in r249160 which was the fix for Bug 201181: Bug 201181: InlineTextBox::end() should return first-past-end offset <https://bugs.webkit.org/show_bug.cgi?id=201181> <rdar://problem/54758922> <https://trac.webkit.org/changeset/249160/webkit>
<rdar://problem/61954169>
Forcing a repaint in Safari does not “fix” the discontinuity. You can fix it by deleting the next blank line after the discontinuity (which makes the deletion jump up two lines), then hit Enter again to make it appear the way it should have originally.
At the end of the second "lorem" line, I can't press the down key to go to the next line.
(In reply to Jon Lee from comment #3) > At the end of the second "lorem" line, I can't press the down key to go to > the next line. As noted in Comment #0: > (Using up/down arrow keys will actually not move the insertion bar past the deleted newline.) Part of the behavior of this bug.
Created attachment 397191 [details] patch
Created attachment 397208 [details] patch
Created attachment 397213 [details] patch
Committed r260528: <https://trac.webkit.org/changeset/260528> All reviewed patches have been landed. Closing bug and clearing flags on attachment 397213 [details].