Bug 44082 - Selection.addRange() does not add a range from a node with sibling editable elements
Summary: Selection.addRange() does not add a range from a node with sibling editable e...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-08-16 17:32 PDT by Nate Whetsell
Modified: 2022-08-06 15:57 PDT (History)
7 users (show)

See Also:


Attachments
Test document (797 bytes, text/html)
2010-08-16 17:32 PDT, Nate Whetsell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Whetsell 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.
Comment 1 Ahmad Saleem 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!
Comment 2 Radar WebKit Bug Importer 2022-08-06 15:57:50 PDT
<rdar://problem/98253991>