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

Set mousemove and pointermove events during dragging and resizing to be excluding inputs #103

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
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
18 changes: 10 additions & 8 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -408,14 +408,16 @@ Excluding inputs generally include
However, an event whose only effect is to begin or update a fling or scroll
gesture is not an excluding input.

The user agent may delay the reporting of layout shifts after a
<a href="https://www.w3.org/TR/pointerevents/#the-pointerdown-event">pointerdown</a> event
until such time as it is known that the event does not begin a fling or scroll
gesture.

The <a href="https://www.w3.org/TR/uievents/#event-type-mousemove">mousemove</a> and
<a href="https://www.w3.org/TR/pointerevents/#the-pointermove-event">pointermove</a>
events are also not excluding inputs.
* When a <a href="https://www.w3.org/TR/pointerevents/#the-pointerdown-event">pointerdown</a> event or
a <a href="https://www.w3.org/TR/uievents/#event-type-mousedown">mousedown</a> event is received, the
user agent starts buffering the layout shifts.
* When a <a href="https://www.w3.org/TR/pointerevents/#the-pointercancel-event">pointercancel</a> event
is received, all the accumulated layout shift score in the buffer is reported, and it is not an excluding input.
* When a <a href="https://www.w3.org/TR/pointerevents/#the-pointerup-event">pointerup</a> event or a
<a href="https://www.w3.org/TR/uievents/#event-type-mouseup">mouseup</a> event is received, the buffer is reset.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: 'buffer is reset' is a bit unclear since we didn't say what the buffer is. But in any case we need to report the accumulated layout shifts before that. Do we need to also reset when we get pointercancel?

Also, we may want to specify how we compute attribution while buffering? I actually think I found a Chrome bug, filing it.

The <a href="https://www.w3.org/TR/pointerevents/#the-pointerup-event">pointerup</a> or
<a href="https://www.w3.org/TR/uievents/#event-type-mouseup">mouseup</a> event is considered an excluding input
and then the layout shifts are reported with no score change.

{{LayoutShift}} interface {#sec-layout-shift}
=======================================
Expand Down