[Webkit-unassigned] [Bug 146516] New: Clicks on detached checkboxes don't bubble

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 1 09:54:31 PDT 2015


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

            Bug ID: 146516
           Summary: Clicks on detached checkboxes don't bubble
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Event Handling
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: m.goleb+bugzilla at gmail.com

Steps to reproduce the problem:

var div = document.createElement('div');
div.innerHTML = '<input type="checkbox">';
var input = div.querySelector('input');
div.addEventListener('click', function () {console.log('click on the div');});
input.addEventListener('click', function () {console.log('click on the input');});
var event = new MouseEvent('click', {
    'view': window,
    'bubbles': true,
    'cancelable': true
  });
input.dispatchEvent(event);

What is the expected behavior?
Console output should show:

"click on the input"
"click on the div"

What went wrong?
Console output shows:

"click on the input"

That is, the event is not bubbled to the div.

Reported also for Chrome at https://code.google.com/p/chromium/issues/detail?id=479207. Safari is now the only browser that does it this way. This seems to be introduced in https://bugs.webkit.org/show_bug.cgi?id=12918

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150701/8096f556/attachment.html>


More information about the webkit-unassigned mailing list