[Webkit-unassigned] [Bug 197894] Inserting a newline in contenteditable causes two characters to be added instead of one
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 19 23:40:43 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=197894
--- Comment #45 from Ryosuke Niwa <rniwa at webkit.org> ---
(In reply to Ryosuke Niwa from comment #44)
> Comment on attachment 371007 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=371007&action=review
>
> > Source/WebCore/editing/Editing.cpp:1131
> > + if (range->startPosition() == range->endPosition()) {
> > + it.advance(1);
> > + return VisiblePosition(it.range()->startPosition());
> > + }
>
> This code is correct. it.advance(1) can put the text iterator at the end,
> and if so, calling it.range() would result in a crash.
This code is *incorrect*.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190620/693172b4/attachment-0001.html>
More information about the webkit-unassigned
mailing list