WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
102666
[Shadow DOM]: Retargeting of relatedTarget algorithm doesn't work
https://bugs.webkit.org/show_bug.cgi?id=102666
Summary
[Shadow DOM]: Retargeting of relatedTarget algorithm doesn't work
Sergey G. Grekhov
Reported
2012-11-19 02:08:29 PST
Please run the following example in Chrome (my Chrome 23.0.1271.64 m): <html> <head> <script type="text/javascript"> function test() { var d = document; var SR = window.ShadowRoot || window.WebKitShadowRoot; //Shadow root to play with var s = new SR(d.querySelector('#host')); var div1 = d.createElement('div'); div1.setAttribute('style', 'height:100%; width:100%'); div1.setAttribute('id', 'div1'); s.appendChild(div1); var div2 = d.createElement('div'); div2.setAttribute('style', 'height:100%; width:100%'); div2.setAttribute('id', 'div2'); d.body.appendChild(div2); d.body.addEventListener('mouseover', function(event) { alert('event.relatedTarget.id=' + event.relatedTarget.getAttribute('id')); }, false); var evt = document.createEvent("MouseEvents"); evt.initMouseEvent("mouseover", true, false, window, 0, 10, 10, 10, 10, false, false, false, false, 0, div1); div2.dispatchEvent(evt); } </script> </head> <body onload="test()"> <div id="host"> </div> </body> </html> As you can see related target is "div1" but according
http://www.w3.org/TR/shadow-dom/#retargeting-related-target
expected relatedTarget is "host"
Attachments
Add attachment
proposed patch, testcase, etc.
Hayato Ito
Comment 1
2012-12-06 03:01:51 PST
I've confirmed that
http://trac.webkit.org/changeset/136818
fixed this. Closing.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug