NEW 44082
Selection.addRange() does not add a range from a node with sibling editable elements
https://bugs.webkit.org/show_bug.cgi?id=44082
Summary Selection.addRange() does not add a range from a node with sibling editable e...
Nate Whetsell
Reported 2010-08-16 17:32:28 PDT
Created attachment 64539 [details] Test document When a div (for example) contains sibling contentEditable elements, it is impossible to select the sibling elements simultaneously, even when adding a range containing the div to the window's selection. The attached HTML file selects a range containing a div and displays an alert containing the selection's contents. The selection is empty in WebKit; in Firefox, the selection contains the contents of the div.
Attachments
Test document (797 bytes, text/html)
2010-08-16 17:32 PDT, Nate Whetsell
no flags
Ahmad Saleem
Comment 1 2022-08-03 05:06:42 PDT
I am able to reproduce this bug in Safari 15.6 on macOS 12.5 and it does not show anything within dialog window and also does not select any text later (after dismissing the dialog). *** Safari 15.6 on macOS 12.5 *** Empty dialog showing (Selection is: *empty*) and then after dismissing, it does not select any text. *** Chrome Canary 106 *** Empty dialog showing (Selection is: *empty*) and then after dismissing, it does select both lines (text). *** Firefox Nightly 105 *** Show dialog with "Selection Text" inside and after dismissing, it also select text both lines. ___ I think Safari should at least select text but ideally should mimic behavior of Firefox (unless it is non-standard). Thanks!
Radar WebKit Bug Importer
Comment 2 2022-08-06 15:57:50 PDT
Note You need to log in before you can comment on or make changes to this bug.