Re: [csswg-drafts] [css-view-transitions-1] User input should be ignored when rendering is suppressed. (#7797)

The CSS Working Group just discussed `[css-view-transitions-1] User input should be ignored when rendering is suppressed.`, and agreed to the following:

* `RESOLVED: target pointer events to the document element`

<details><summary>The full IRC log of that discussion</summary>
&lt;JakeA> https://github.com/w3c/csswg-drafts/issues/7797#issuecomment-1469931231<br>
&lt;khush> Jake's getting 'em all! :)<br>
&lt;fantasai> s/Topic/Subtopic/<br>
&lt;fantasai> s/topic: break//<br>
&lt;emeyer> JakeA: During a transition, elements involved are hidden from the DOM<br>
&lt;Rossen_> q<br>
&lt;emeyer> …That usually means every element is hidden, because the root element has a transition name<br>
&lt;emeyer> …Clicks during a transition will almost always hit the pseudo and fall to the document root<br>
&lt;emeyer> …Authors could change this by changing the root’s transition name to none<br>
&lt;emeyer> …Question is: what do we do with clicks while promises haven’t settled and the transition is frozen?<br>
&lt;emeyer> …Similar case: if you block the event loop using a while loop, it will block rendering<br>
&lt;emeyer> …If a user clicks anywhere, those events are queueing up<br>
&lt;emeyer> …Once the freeze is thawed, the events and hit tests and such are resolved then, which may resolve hits against things that moved<br>
&lt;emeyer> …We can’t do a full event block, but we could take from tasksources and then resolve when the transition starts<br>
&lt;emeyer> …Deadlocks are still possible in this option, which may also conflict with scoped transitions<br>
&lt;emeyer> …We don’t want to block all input events while scoped transition is happening<br>
&lt;emeyer> …Option 2: we apply all events to the document element<br>
&lt;TabAtkins> q+<br>
&lt;emeyer> …In that case, a click may hit the document element whereas if we’d queued it, it might have hit a more specific element<br>
&lt;flackr> q+<br>
&lt;khush> +1 for option 2.<br>
&lt;emeyer> Rossen: I want to make sure we’re sticking to CSS<br>
&lt;emeyer> TabAtkins: +1 for option 2, which seems a little safer; also I hate when things resolve against DOM I wasn’t expecting; also makes things more predictable<br>
&lt;Rossen_> ack TabAtkins<br>
&lt;Rossen_> ack flackr<br>
&lt;emeyer> flackr: I think a common case is that by the time you’d dispatch the events in option 1, the elements will be where they should be<br>
&lt;khush> q+<br>
&lt;emeyer> …Worried that we’re seen cases transitions to move small pieces of sub-documents<br>
&lt;emeyer> …I strongly prefer option 1<br>
&lt;Rossen_> ack khush<br>
&lt;emeyer> khush: If we decide to buffer until rendering is done, the first question is do we dispatch before or after creating the pseudo-DOM?<br>
&lt;emeyer> …Why not just give it to the document?<br>
&lt;emeyer> JakeA: I think flackr’s point is that if you have a pseudo-element is in a certain place, option 2 raises the chances of a thing not being where it was when the click was made<br>
&lt;emeyer> khush: So this is for the case of rootless transitions?<br>
&lt;emeyer> JakeA: This is all about rootless transitions<br>
&lt;emeyer> flackr: If I start a transition on mousedown, as long as my pseudo is pointer-events: none, I can still get that click<br>
&lt;emeyer> …I also feel like you have a halting issue regardless, since there’s no requirement a transition ever finish<br>
&lt;chrishtr> q+<br>
&lt;emeyer> JakeA: Should have clarified that this deadlocks are already limited to four seconds<br>
&lt;emeyer> flackr: So this isn’t new, it’s just we could make them more likely<br>
&lt;emeyer> …If a developer doesn’t finish setting up for a view transition, there will be problems<br>
&lt;emeyer> chrishtr: With option 2, if the dev starts a transition but then does nothing and we wait four seconds, if the user clicks in that 4s window, is the click lost?<br>
&lt;emeyer> JakeA: Yeah, in option 2, the click won’t work<br>
&lt;Rossen_> ack chrishtr<br>
&lt;emeyer> chrishtr: So the default UA behaviors are suppressed<br>
&lt;khush> q+<br>
&lt;emeyer> flackr: In option 1, we wait for the transition to fail to start, the events are processed after the transition is canceled<br>
&lt;emeyer> chrishtr: Could we do an option 3 where user events are still processed and applied to the original target?<br>
&lt;Rossen_> ack khush<br>
&lt;emeyer> khush: Option 1 is very hard to reason about with scoped transitions, whichis why I’m advocating option 2<br>
&lt;emeyer> …The easiest thing is to dispatch an event at the root of the subtree,<br>
&lt;vmpstr> +1<br>
&lt;Rossen_> ack khush<br>
&lt;emeyer> flackr: An event targeted at the document provdes XY coords, yes?<br>
&lt;emeyer> khush: Yes<br>
&lt;emeyer> Rossen: We seem to be sliding to option 2; flackr, you were the main proponent of 1<br>
&lt;emeyer> flackr: I like that option 2 supports scoped transitions better<br>
&lt;emeyer> …I think it’s okay<br>
&lt;emeyer> Rossen: Any other opinions or objections to resolved on option 2?<br>
&lt;emeyer> (silence)<br>
&lt;JakeA> Target pointer events to the document element<br>
&lt;JakeA> This is what will happen during the transition in most cases anyway, except in the edge case mentioned above, where the root's view-transition-name is set to none, and the clicks don't hit the pseudos. In that case, click may hit the document element, where they would hit a more specific element during the transition.<br>
&lt;emeyer> RESOLVED: target pointer events to the document element<br>
&lt;flackr> Or to the root of the transition for future compat with scoped transitions!<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7797#issuecomment-1470359727 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 15 March 2023 16:30:17 UTC