w3c / pointerlock

Pointer Lock
https://w3c.github.io/pointerlock/
Other
17 stars 16 forks source link

Don't monkey patch HTML's list of activation triggering input event #70

Closed marcoscaceres closed 2 years ago

marcoscaceres commented 3 years ago

Related fix on the HTML side: https://github.com/whatwg/html/pull/6818


Preview | Diff

marcoscaceres commented 3 years ago

@mustaqahmed, looks like "activation triggering input event" vanished from HTML. Any idea what that should be now?

mustaqahmed commented 3 years ago

@mustaqahmed, looks like "activation triggering input event" vanished from HTML. Any idea what that should be now?

Sorry trying to understand what you meant by "vanished"...I can still see it here. Perhaps you meant a missing <dfn export> instead, which is being added in https://github.com/whatwg/html/pull/6818?

marcoscaceres commented 3 years ago

Ah, indeed! I thought it was exported already! Sorry for the confusion on my part.

mustaqahmed commented 3 years ago

@marcoscaceres I got a chance to look at it again after a while, and now it seems to me we can significantly clarify the current dependence to HTML if we simply drop the "engagement gesture" section and fix the existing 5 references by:

  1. saying requestPointerLock() is a Transient activation-gated API, and
  2. adding the non-normative exception currently mentioned in the "Note" about "no engagement gesture is required".

This change would make the text more precise, and as a bonus point, we will be able to land this PR independently from whatwg/html#6818.

What do you think?

marcoscaceres commented 3 years ago

sounds great, @mustaqahmed. The only thing would be getting "activation triggering input event" exported from HTML, but what you suggest makes sense.

mustaqahmed commented 3 years ago

Please consider the suggestion above without getting blocked by a holistic (and possibly involved) change needed on the HTML side. Landing the PointerLock change here before the HTML change would still be a big improvement because the current "engagement gesture" section is too incomplete anyway (it doesn't mention PointerEvents or TouchEvents, for example).