Closed Bug 1607852 Opened 6 years ago Closed 1 year ago

Press TAB to view leaderboard on Tanki Online, and then release TAB, somethings it requires a user gesture to make pointerLock working

Categories

(Core :: DOM: Core & HTML, defect, P3)

71 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1944580
Tracking Status
firefox72 --- affected
firefox73 --- affected
firefox74 --- affected

People

(Reporter: u652361, Unassigned)

References

(Blocks 2 open bugs)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

For example, if I play Tanki Online, when I press TAB to view leaderboard, and then release TAB, my cursor doesn't focus in game again. (Or Pause menu instead of Leaderboard, same thing)

Actual results:

The cursor didn't focus and I had to click again for it to focus.

Expected results:

It should focus on the game automatically as in Google Chrome.

Hi,

Thank you for submitting the report. I was able to reproduce the issue on Win10x64 and Mac 10.14 using Firefox versions 72.0.1, 73.0b4 and 74.0a1 (2020-01-12). I am assigning a component to get an opinion from the development team.

Status: UNCONFIRMED → NEW
Type: enhancement → defect
Component: Untriaged → DOM: UI Events & Focus Handling
Ever confirmed: true
Product: Firefox → Core

There is also another issue. Scrolling Bars. They are not "designer", I want to say, on Google Chrome for example, they are (CSS or what probably), but CSS doesn't affect those in Firefox. And scrolling is very very slow when you use the scroller on your mouse. On Chrome, it seems to be normal.

(In reply to Wizertex from comment #0)

Expected results:

It should focus on the game automatically as in Google Chrome.

When pressing TAB, we exit the pointerLock mode, so do Chrome.
However, in Chrome it seems to enter pointerLock mode immediately right after user releases TAB, but we require users to click the mouse again.

Blocks: pointer-lock
Component: DOM: UI Events & Focus Handling → DOM: Core & HTML
Priority: -- → P3

bug 1627723 improves this a bit but still could be reproduced if holding TAB > 5 sec without pressing other keys or clicking the mouse.

Depends on: 1627723

(In reply to Edgar Chen [:edgar] from comment #4)

bug 1627723 improves this a bit but still could be reproduced if holding TAB > 5 sec without pressing other keys or clicking the mouse.

I wonder how Google Chrome handle this case.

It is because we don't treat TAB as a user gesture, but Google Chrome seems to treat it so.

Blocks: 1577516
Summary: Cursor focusing broken → Press TAB to view leaderboard on Tanki Online, and then release TAB, somethings it requires a user gesture to make pointerLock working

Just found https://w3c.github.io/pointerlock/#dom-element-requestpointerlock saying,

Conversely, if pointer lock is exited via exitPointerLock() no engagement gesture is required to reenter pointer lock. This enables applications that frequently move between interaction modes, and ones that may do so based on a timer or remote network activity.

Severity: normal → S3
Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1944580
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.