Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a note and diagram to clarify legacy mouse pointer behavior. #458

Merged
merged 7 commits into from
Oct 27, 2022

Conversation

mustaqahmed
Copy link
Member

@mustaqahmed mustaqahmed commented Sep 29, 2022

This shows the effective position of legacy mouse pointer when two primary pointers are active at the same time, and points out the disconnection between pointerout and mouseout events.

Closes #454.


Preview | Diff

This shows the effective position of legacy mouse pointer when two
primary pointers are active at the same time, and points out the
disconnection between `pointerout` and `mouseout` events.
@mustaqahmed
Copy link
Member Author

@flackr and @patrickhlauke PTAL. I will fine-tune on the animated GIF once the text seems okay.

index.html Outdated Show resolved Hide resolved
@patrickhlauke
Copy link
Member

Did some tweaking/rewording

Instead of repeating the same concepts in slightly different way in the note, replace the possibly a bit obscure original wording with some of the clearer prose.
Use `<video>` element for the `.webm` rather than `<img>` (as, at least for me, this didn't appear to be supported in the browser)
index.html Outdated Show resolved Hide resolved
@@ -1196,7 +1196,7 @@ <h1><dfn data-lt="compatibility mouse events">Compatibility mapping with mouse e
</div>
<section>
<h2><dfn>Tracking the effective position of the legacy mouse pointer</dfn></h2>
<p>While only <a>primary pointers</a> can produce compatibility mouse events, <a href="#multiple-primary-pointers">multiple primary pointers</a> can be active simultaneously, each producing its own compatibility mouse events. For compatibility with scripts relying on MouseEvents, mouse transition events (<code>pointerover</code>, <code>pointerout</code>, <code>pointerenter</code> and <code>pointerleave</code>) SHOULD simulate the movement of a <em>single</em> legacy mouse input. This means that the entry/exit state for every event target is valid, in accordance with [[UIEVENTS]]. Users agents SHOULD guarantee this by maintaining the <dfn>effective position of the legacy mouse pointer</dfn> in the document as follows.</p>
<p>While only <a>primary pointers</a> can produce compatibility mouse events, <a href="#multiple-primary-pointers">multiple primary pointers</a> can be active simultaneously, each producing its own compatibility mouse events. For compatibility with scripts relying on MouseEvents, the mouse transition events (<code>mouseover</code>, <code>mouseout</code>, <code>mouseenter</code> and <code>mouseleave</code>) SHOULD simulate the movement of a <em>single</em> legacy mouse input. This means that the entry/exit state for every event target is valid, in accordance with [[UIEVENTS]]. Users agents SHOULD guarantee this by maintaining the <dfn>effective position of the legacy mouse pointer</dfn> in the document as follows.</p>
Copy link
Member

Choose a reason for hiding this comment

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

Good catch listing the actual mouse* events here, rather than pointer* ones

and <code>pointerleave</code>) to corresponding legacy mouse transition events (i.e., <code>mouseover</code>,
<code>mouseout</code>, <code>mouseenter</code> and <code>mouseleave</code>). The following animation illustrates a case
where a user agent needs to dispatch more legacy mouse transition events than pointer transition events to be able to
reconcile two primary pointers using a single legacy mouse input.</p>
Copy link
Member

Choose a reason for hiding this comment

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

Looking good, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Order of pointerover/enter/move and corresponding mouse events is different on browsers
3 participants