[Webkit-unassigned] [Bug 145212] selection.getRangeAt(0) should return a reference to the range, not a copy

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 16 06:02:23 PDT 2019


Danilo <db at threema.ch> changed:

           What    |Removed                     |Added
                 CC|                            |db at threema.ch

--- Comment #4 from Danilo <db at threema.ch> ---
I came across this problem when implementing a text editor. The spec clearly says that a reference should be returned, not a copy, so Safari does not implement getRangeAt in a compliant way.

A workaround is to modify the returned range, to remove the existing selection ranges and to re-add the modified range to the DOM. But that's quite an inefficient way of working with selections and ranges.

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/20190416/41201331/attachment-0001.html>

More information about the webkit-unassigned mailing list