Closed
Bug 1928340
Opened 1 year ago
Closed 1 year ago
Pointer lock is released unexpectedly when the DevTools panel is closed using F12
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
134 Branch
| Tracking | Status | |
|---|---|---|
| firefox134 | --- | fixed |
People
(Reporter: edgar, Assigned: edgar)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
STR:
- Load https://mdn.github.io/dom-examples/pointer-lock/.
- Open DevTools panel via F12.
- Click the red circle to request pointer lock.
- Close DevTools panel via F12.
Expected result:
Pointer is still locked.
Actual result:
Pointer lock is released.
| Assignee | ||
Updated•1 year ago
|
Blocks: pointer-lock
| Assignee | ||
Comment 1•1 year ago
•
|
||
It is because when DevTools panel is closed, the Document::OnPageHide is called when the document of DevTools is destroyed, which calls PointerLockManager::Unlock. And the PointerLockManager::Unlock just unconditionally notify content process to release pointer lock in https://searchfox.org/mozilla-central/rev/783f3fca1dda58353f7d3075744dd48b66e00e5e/dom/base/PointerLockManager.cpp#195-201. In such case, we should not need to ask content to release the pointer lock.
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
Updated•1 year ago
|
Assignee: nobody → echen
Status: NEW → ASSIGNED
| Assignee | ||
Comment 4•1 year ago
|
||
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fe8b67c873fb
Add some log for pointer lock; r=smaug
https://hg.mozilla.org/integration/autoland/rev/41eeee000de1
Prevent unexpected pointer lock release from the parent process; r=smaug
Comment 6•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/fe8b67c873fb
https://hg.mozilla.org/mozilla-central/rev/41eeee000de1
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
status-firefox134:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•