[w3c/webcomponents] Retargeting algorithm shouldn't set relatedTarget to null even when target and relatedNode are in two distinct disconnected trees (#494)

It looks like the [retargeting algorithm](http://w3c.github.io/webcomponents/spec/shadow/#dfn-retargeting-algorithm) as currently spec'ed ends up setting `relatedTarget` to `null` if `target` and `relatedTarget` belong to two distinct disconnected trees.

More formally, let A be `target`'s tree and B be `relatedTarget`'s tree.  When A and B are distinct and disconnected from one another (that is, it doesn't share any [shadow-including inclusive ancestor](http://w3c.github.io/webcomponents/spec/shadow/#dfn-shadow-including-inclusive-ancestor)), then the current algorithm adjusts `relatedTarget` to `null`.

I don't think this is a Web compatible behavior as authors can clearly dispatch a mouse event with `relatedTarget` set to whatever node they please to today.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/494

Received on Wednesday, 4 May 2016 06:14:09 UTC