Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,66 @@ <h4>Event dispatch</h4>
<p>Otherwise (|event| is a <code>click</code> or <code>auxclick</code> event for which |userEvent| is a <code>pointerup</code> event that was dispatched uncaptured) let |target| be the nearest common inclusive ancestor of the corresponding <code>pointerdown</code> and <code>pointerup</code> targets in the DOM at the moment |event| is being dispatched.</p>
</li>

<li>
<p>If |event| is a <code>click</code> event, then:</p>
<ol>
<li>
<p>Let |pointerDownTarget|, |pointerDownX|, |pointerDownY|, |pointerUpTarget|, |pointerUpX|, and |pointerUpY| each be null.</p>
</li>

<li>
<p>If |event| had corresponding <code>pointerdown</code> and <code>pointerup</code> events preceding it, then:</p>
<ol>
<li>
<p>Set |pointerDownTarget| to the corresponding <code>pointerdown</code> event's event target.</p>
</li>

<li>
<p>Set |pointerDownX| to the corresponding <code>pointerdown</code> event's <code>clientX</code>.</p>
</li>

<li>
<p>Set |pointerDownY| to the corresponding <code>pointerdown</code> event's <code>clientY</code>.</p>
</li>

<li>
<p>Set |pointerUpTarget| to the corresponding <code>pointerup</code> event's event target.</p>
</li>

<li>
<p>Set |pointerUpX| to the corresponding <code>pointerup</code> event's <code>clientX</code>.</p>
</li>

<li>
<p>Set |pointerUpY| to the corresponding <code>pointerup</code> event's <code>clientY</code>.</p>
</li>
</ol>
</li>

<li>
<p>Otherwise:</p>
<ol>
<li>
<p>Set |pointerDownTarget| and |pointerUpTarget| to |event|'s event target.</p>
</li>

<li>
<p>Set |pointerDownX| and |pointerUpX| to |event|'s <code>clientX</code>.</p>
</li>

<li>
<p>Set |pointerDownY| and |pointerUpY| to |event|'s <code>clientY</code>.</p>
</li>
</ol>
</li>

<li>
<p><a href="https://html.spec.whatwg.org/#run-light-dismiss-activities">Run light dismiss activities</a> given |pointerDownTarget|, |pointerDownX|, |pointerDownY|, |pointerUpTarget|, |pointerUpX|, and |pointerUpY|.</p>
</li>
</ol>

</li>
Comment thread
josepharhar marked this conversation as resolved.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be step 4. Now it is kind of outside the main algorithm

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I moved up the run light dismiss step. How does it look?


<li>
<p>Dispatch |event| to |target| following the [[UIEVENTS]] spec.</p>
<div class="note">If |userEvent| was captured, |event| is dispatched to the capturing target of |userEvent| even though the {{GlobalEventHandlers/lostpointercapture}} event with the same {{PointerEvent/pointerId}} has been dispatched already.</div>
Expand Down