[Webkit-unassigned] [Bug 67827] New: event.stopPropagation does not prevent click events from activating links

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 8 19:07:54 PDT 2011


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

           Summary: event.stopPropagation does not prevent click events
                    from activating links
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
        OS/Version: Mac OS X 10.7
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: marc.hoyois at gmail.com


Created an attachment (id=106830)
 --> (https://bugs.webkit.org/attachment.cgi?id=106830&action=review)
HTML file demonstrating the bug

Overview:
If a click event on a children of an <a> tag is stopped with stopPropagation(), the link is still activated. Even capturing the click event on the document before it descends to the link does not work.

Steps to reproduce:
Check the attached html page: clicking inside the video element navigates to webkit.org.

Notes:
I know event.preventDefault() can be used to neutralize links, but this is not sufficient in many use cases.
For example, in the attached HTML page, a video element sits inside a div which is inside a link. What if we want clicks on the blue div to activate the link,
but not clicks on the video? The only way to do it is to preventDefault() the click on the video element which makes the controls unusable…

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