RESOLVED FIXED 210677
REGRESSION (r249160): Deleting newline after pasting text ending in a newline results in a discontinuity
https://bugs.webkit.org/show_bug.cgi?id=210677
Summary REGRESSION (r249160): Deleting newline after pasting text ending in a newline...
David Kilzer (:ddkilzer)
Reported 2020-04-17 15:55:02 PDT
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>
Attachments
patch (3.17 KB, patch)
2020-04-22 08:11 PDT, Antti Koivisto
zalan: review+
patch (3.51 KB, patch)
2020-04-22 09:34 PDT, Antti Koivisto
no flags
patch (3.47 KB, patch)
2020-04-22 10:01 PDT, Antti Koivisto
no flags
Radar WebKit Bug Importer
Comment 1 2020-04-17 15:55:21 PDT
David Kilzer (:ddkilzer)
Comment 2 2020-04-17 16:06:31 PDT
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.
Jon Lee
Comment 3 2020-04-17 16:50:05 PDT
At the end of the second "lorem" line, I can't press the down key to go to the next line.
David Kilzer (:ddkilzer)
Comment 4 2020-04-18 13:35:11 PDT
(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.
Antti Koivisto
Comment 5 2020-04-22 08:11:01 PDT
Antti Koivisto
Comment 6 2020-04-22 09:34:48 PDT
Antti Koivisto
Comment 7 2020-04-22 10:01:03 PDT
EWS
Comment 8 2020-04-22 12:24:59 PDT
Committed r260528: <https://trac.webkit.org/changeset/260528> All reviewed patches have been landed. Closing bug and clearing flags on attachment 397213 [details].
Note You need to log in before you can comment on or make changes to this bug.