[Webkit-unassigned] [Bug 62092] New: setting innerText to an empty string on editable div loses focus

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jun 4 10:38:12 PDT 2011


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

           Summary: setting innerText to an empty string on editable div
                    loses focus
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P4
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: una.sabovic at palm.com


Created an attachment (id=96025)
 --> (https://bugs.webkit.org/attachment.cgi?id=96025&action=review)
simple page to demo the problem

When editable divs innerText is set to an empty string caret is lost. Calling element.focus() on that div doesn't restore the caret 
since that element is already the focused node. Focus is on the element but the caret can not be restored and typing doesn't do anything.

This happens because after setting text to an empty string and removing children nodes selection is set to noselection. 

Same problem happens when clearing innerHTML, but I'm not sure if that should be fixed too.

-- 
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