Open main menu

CDOT Wiki β

Changes

Implementing the Mouse Lock API in Firefox

17 bytes added, 15:39, 30 November 2011
Implementation
# <s>Freeze mouse pointer in centre of window when mouse lock is enabled (e.g., moving the mouse causes an event, but forces the mouse to go back to the original position).</s> - JSilver999
# "The Mouse Lock API must exit the mouse lock state if the user agent, window, or tab loses focus"
# <strike>"Events that require the concept of a mouse cursor must not be dispatched (for example: mouseover, mouseout)" </strike> - rhunghumph
# "When unlocked, the system cursor can exit and re-enter the user agent window. If it does so and the user agent was not the target of operating system mouse move events then the most recent mouse position will be unknown to the user agent and movementX/Y can not be computed and must be set to zero"
# "User agents may prompt for confirmation before locking, this preference may be saved as a content setting" How to deal with this? What UI do we use? See also, "Repeated escapes of mouse lock can signal user agent to not re-lock the mouse without more specific user intent gesture, e.g. similar to how Chrome suppresses repeated alert() calls"