Mouse cursor can break outside the window bounds while pointer is locked with Pointer Lock API

NEW
Unassigned

Status

()

Core
DOM
5 years ago
a year ago

People

(Reporter: humph, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
x86
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
When we first did the Pointer Lock implementation (bug 633602), we did it only for fullscreen elements.  Since then work has been done to implement the rest of the spec, and add support for non-fullscreen elements (bug 737100).  The latter has exposed a bug in the earlier work, namely, when the mouse is locked, it is possible to move it quickly enough to break outside the bounds of the window, causing the mouse cursor to appear.

STR:

* Make your browser window 1/3 of your screen, place it in the centre
* Go to http://www.html5rocks.com/en/tutorials/pointerlock/intro/
* Find the "Click Me!" button, click it
* Allow pointer lock in the door hanger (click "Yes")
* Notice the mouse pointer is locked, and cursor vanishes
* Try moving really fast, notice you can get a mouse pointer outside the browser (i.e., the arrow appears)
* Move back toward the browser, notice the arrow vanish and pointer lock take over again

I get this on my iMac with an Apple mouse, and in a Windows VM.  smaug is unable to reproduce it.  In the fullscreen-only case, you had to have multiple monitors to hit this, so it was basically a non-issue; now in the non-fullscreen case it makes for a jarring experience.
I can also reproduce this on OS X 10.8... With the additional excitement that it will thusly trigger the Mission Control hotcorner I have set up.
I think this is what I'm seeing in OSX 10.8.5.
http://timeinvariant.github.io/gorescript/play/
Hi Xidorn, this bug was mentioned in the mid-aurora sign offs by SoftVision team. Is this something we plan to fix in Aurora50? It seems to be such an old bug that it could not possible block the Fx50 release. Right?
Flags: needinfo?(xidorn+moz)
I don't think it needs to block Fx50.

This is probably not very hard to fix, but need some investigation on different platforms.
Component: DOM: Core & HTML → DOM
Flags: needinfo?(xidorn+moz)
Hi Xidorn,
I've been testing Pointer Lock API and saw this issue and investigated it a little. This reproduces only on Mac and Ubuntu for me (not in Windows 10 x64) on the latest Nightly (20160831030224) and the latest Aurora (id: 20160901004001) using this tool: www.media.tojicode.com/q3bsp/ 
Please ni? me if I can be of further help.
(In reply to Xidorn Quan [:xidorn] (UTC+10) from comment #4)
> I don't think it needs to block Fx50.
> 
> This is probably not very hard to fix, but need some investigation on
> different platforms.

Gotcha. Thanks!
You need to log in before you can comment on or make changes to this bug.