Skip to content

Commit

Permalink
Shadow: do not dispatch an event when target is reletedTarget
Browse files Browse the repository at this point in the history
For example, when a mouse pointer moves from an element in a shadow tree to
its shadow host, a mouseover event should not be dispatched on the
shadow host. The current spec allows a non-empty event path in this case.

Fixes #337.
  • Loading branch information
hayatoito authored and annevk committed Oct 18, 2016
1 parent cb12fd4 commit afac504
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,9 @@ for discussion).
<a>relatedTarget</a> against <var>target</var> if <var>event</var>'s <a>relatedTarget</a> is
non-null, and null otherwise.

<li><p>If <var>target</var> is <var>relatedTarget</var> and <var>target</var> is not
<var>event</var>'s <a>relatedTarget</a>, then return true.

<li><p>Append (<var>target</var>, <var>targetOverride</var>, <var>relatedTarget</var>) to <var>event</var>'s
<a for=Event>path</a>.

Expand Down
4 changes: 3 additions & 1 deletion dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<p data-fill-with="logo"><a class="logo" href="https://whatwg.org/"> <img alt="WHATWG" height="100" src="https://resources.whatwg.org/logo-dom.svg"> </a> </p>
<hgroup>
<h1 class="p-name no-ref allcaps" id="title">DOM</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-10-14">14 October 2016</time></span></h2>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-10-18">18 October 2016</time></span></h2>
</hgroup>
<div data-fill-with="spec-metadata">
<dl>
Expand Down Expand Up @@ -887,6 +887,8 @@ <h3 class="heading settled" data-level="3.8" id="dispatching-events"><span class
<p class="note" role="note"><var>legacy target override flag</var> is only used by HTML and only when <var>target</var> is a <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/browsers.html#window">Window</a></code> object. </p>
<li>Let <var>relatedTarget</var> be the result of <a data-link-type="dfn" href="#retarget">retargeting</a> <var>event</var>’s <a data-link-type="dfn" href="#event-relatedtarget">relatedTarget</a> against <var>target</var> if <var>event</var>’s <a data-link-type="dfn" href="#event-relatedtarget">relatedTarget</a> is
non-null, and null otherwise.
<li>
<p>If <var>target</var> is <var>relatedTarget</var> and <var>target</var> is not <var>event</var>’s <a data-link-type="dfn" href="#event-relatedtarget">relatedTarget</a>, then return true. </p>
<li>
<p>Append (<var>target</var>, <var>targetOverride</var>, <var>relatedTarget</var>) to <var>event</var>’s <a data-link-type="dfn" href="#event-path">path</a>. </p>
<li>
Expand Down

0 comments on commit afac504

Please sign in to comment.