-
Notifications
You must be signed in to change notification settings - Fork 33
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
When to continue firing pointer events after a drag operation? #222
Comments
I'm going to implement the behavior of firing pointercancel immediately before drag operation starts for Firefox. But I'm blocked by this question about when to continue firing pointer events and what are the expected boundary events. Wondering whether Edge or Chrome's behavior is expected? |
spec says "From the moment that the user agent is to initiate the drag-and-drop operation, until the end of the drag-and-drop operation, device input events (e.g., mouse and keyboard events) must be suppressed." This answers my first question about when to continue firing pointer events. Regarding boundary events, Edge fires boundary events after dragstart but Chrome doesn't. Spec says "After firing the pointercancel event, a user agent MUST also fire a pointer event named pointerout followed by firing a pointer event named pointerleave." |
Sorry. I missed this one too before. Alright. You are right. We recently started sending pointercancel after drag operation starts and I intentionally for the first round didn't send the boundary events. We already hit some regressions in some js library by sending pointercancel when mouse starts dragging and we send pointercancel for it. But now we solved them and didn't hear anything else so far. Regarding the other question of when to start sending pointerevents again, spec never mentioned the same thing for scrolling case (which also caused pointercancel) either. So I'm not how to exactly include that in the spec to preferably cover all the cases. Do you have any suggestion? |
Edge doesn't fire pointercancel. It fires dragstart, pointerout, and pointerleave. Since the spec already defines that input events must be suppressed when starting a dnd operation until it is finished. I think the behaviour is clear to me. But if we can have a link to that, it will be very helpful when reading the pointer event spec. |
We talked about this in the call and we agreed since we don't specify when to continue sending events in scroll we leave this scenario to UA as well similar to scroll. |
Follow #194, spec says UA must fire pointercancel immediately before drag operation starts. Spec also says UA must also fire pointerout and pointerleave after pointercancel. But spec doesn't mention when to continue firing pointerevents (e.g. after drag operation ends or something).
Tested with hoverable device, Chrome and Edge continue firing pointer events when the drag operation ends. But Chrome fires boundary events (pointerout, pointerleave, pointerover, pointerenter) when the drag operation ends, while Edge fires pointerout, pointerleave when drag operation starts and pointerover, pointerenter when drag operation ends.
The text was updated successfully, but these errors were encountered: