[Webkit-unassigned] [Bug 93760] New: Selection change caused by click event on button should be *after* the onclick fires

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 10 21:07:41 PDT 2012


           Summary: Selection change caused by click event on button
                    should be *after* the onclick fires
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
        OS/Version: Mac OS X 10.8
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: dgatwood at mac.com

Created an attachment (id=157856)
 --> (https://bugs.webkit.org/attachment.cgi?id=157856&action=review)
Demonstrates odd behavior of buttons inside contentEditable regions

I would normally expect a button's onclick handler to fire prior to any in-browser modification of the current DOM selection.  For some odd reason, in WebKit, the reverse occurs—the selection changes first—leading to spectacular misbehavior if you're crazy enough to place a button inside a contentEditable region.  :-)

Test case attached.  The expected behavior is that when you click inside the text above, then click the button, the click event should fire first, causing the content to be inserted at the selection point.  Instead, the insertion point moves first, so that the insertion point is inside the text of the button.  Thus, the content gets inserted inside the button.

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