pointermove movementY is always zero in requestPointerLock mode
Categories
(Core :: DOM: Events, defect, P3)
Tracking
()
People
(Reporter: caiiiycuk, Assigned: edgar)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
2.13 MB,
video/mp4
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0
Steps to reproduce:
- I am able to reproduce it with this:
target.addEventListener("pointerdown", (e) => target.requestPointerLock({ unadjustedMovement: true }));
target.addEventListener("pointermove", (e) => {
console.log(e.movementX, e.movementY);
});
Slowly move mouse up
- Or this testcase from here (https://bugzilla.mozilla.org/show_bug.cgi?id=1895796)
Open https://codepen.io/gensee/full/zYQOXLK, lock mouse and move it
Actual results:
-
The output is 90% zero (i am moving constantly), and sometimes there are +1 -1, cumulative value is zero. This prevents me to play games on different websites using FF.
-
My Y coordinates changes is zero (chrome works fine look at the video).
Expected results:
-
I should see sequences of +1 or -1.
-
y should change
Distributor ID: Ubuntu
Description: Ubuntu 25.10
Release: 25.10
plasmashell 6.4.5
wayland
Comment 2•5 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Events' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•5 months ago
|
||
masayuki, you looked at some movementX/Y stuff recently. Does this bug ring any bells?
Comment 4•5 months ago
|
||
(Today, I was PTO-ish due to a private matter so that I've not investigated this yet.)
I didn't change the logic at least intentionally. So, I have no idea and I'm not familiar with Pointer Lock implementation.
Edgar, how about you?
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Comment 6•4 months ago
|
||
I can reproduce this on Wayland and only happens on OOP iframe. If the pointerlock request is on the top-level document, I can not reproduce the issue, e.g. https://mdn.github.io/dom-examples/pointer-lock/. I think this is Wayland specific issue. And I guess this is something related to https://searchfox.org/firefox-main/rev/eea0f8f080f0eb810c0c6296da9792e81cd69ce6/widget/gtk/nsWindow.cpp#9633-9635. Taking this to see now.
| Assignee | ||
Comment 7•2 months ago
|
||
I believe bug 2036028 also fixes this. Feel free to reopen or file a new bug if you still encounter same issue.
Description
•