Re: [w3c/pointerlock] feature request : Allow to set pointer position upon release (#61)

I'm running into this same issue currently, and I think an easy way to avoid the click-jacking risk is to simply clamp the cursor position within the element that has pointer lock access. If you're already accepting a pointer lock, you're already locked into the element, so I don't think there'd be any risk to having the physical cursor moved within that same bound when the lock is relinquished (it's the same place you clicked to get into it). There could be an additional check to ensure that that same element is still directly underneath the cursor or something, but I don't see that being any worse than the page warping a <button> on top of the position you clicked when `exitPointerLock` is called.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/pointerlock/issues/61#issuecomment-1805194280
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/pointerlock/issues/61/1805194280@github.com>

Received on Friday, 10 November 2023 06:50:50 UTC