[Webkit-unassigned] [Bug 114227] New: Double-click selected text unselected after DOM modification

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 8 17:54:41 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=114227

           Summary: Double-click selected text unselected after DOM
                    modification
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: natevw at yahoo.com


Created an attachment (id=196976)
 --> (https://bugs.webkit.org/attachment.cgi?id=196976&action=review)
Demo allowing reproduction of bug (including "workaround" by selecting with drag or reseting range programmatically)

If the user selects a word by double-clicking it, *any* modifications to the underlying text node cause the user's selection to collapse. This does not happen if the user selects the word by dragging across it, nor if the selected range is fetched and applied before the text node modification.

I believe this may be related to an old thread here https://bugs.webkit.org/show_bug.cgi?id=35625 as the main difference I can see in the results has to do with the anchor/focus/extent values.

When a word is drag-selected:
baseOffset: 24
extentOffset: 28
focusOffset: 28

When a word is double-clicked:
baseOffset: 25*
extentOffset: 25*
focusOffset: 28
* actually dependent on where the user double-clicked.

It seems the selection update code must be relying on the unreliable base/extent information rather than the range information.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list