[UX] Redesign Pointer Lock experience to be less intrusive and jarring when possible

NEW
Unassigned

Status

()

Firefox
General
2 years ago
2 years ago

People

(Reporter: cvan, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ux])

(Reporter)

Description

2 years ago
A door-hanger permission prompt is displayed every time Pointer Lock is requested.

There was work done last year to nicely clean up the Fullscreen permission prompt behaviour (proposed in bug 1129061 and implemented in bug 1160023):

    http://people.mozilla.org/~mverdi/projects/fullscreen/#game-interactions

My proposal would be to show the door-hanger only if the user's permissions are to "Ask" for this site/all sites:

    example.com wants to disable your mouse cursor. [ Allow ]  [ Deny ]

If allowed from a secure origin, enter Pointer Lock, always remember that choice and never block on the permission prompt again (unless the user later changes the permission settings).

If allowed from a insecure origin, enter Pointer Lock, but only for that page session. 

Once we have permission to enter Pointer Lock, display a toast notification that disappears after pressing ESC:

    example.com has disabled your mouse cursor. Press ESC to exit.

It's probably worth filing a separate bug, but could the Pointer Lock API make use of the Permissions API (https://w3c.github.io/permissions/#permission-registry)?
(Reporter)

Updated

2 years ago
Whiteboard: [ux]
You need to log in before you can comment on or make changes to this bug.