Open Bug 1740573 Opened 3 years ago Updated 2 years ago

Treat GamePad input as a user gesture so users can enter fullscreen mode by a controller

Categories

(Core :: DOM: Device Interfaces, defect)

Firefox 95
defect

Tracking

()

UNCONFIRMED

People

(Reporter: cyril.walle, Unassigned)

References

(Blocks 1 open bug)

Details

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

Steps to reproduce:

Source code: https://gitlab.com/GrosSacASac/Spacuuu
npm i
npm run serve
or Open
https://elegant-cori-047151.netlify.app/

Use a controller (I tried with an xbox controller)
(Click screen to have focus)
Go down to option
Press A to open
Go to full screen
Press A to activate full screen

Actual results:

19:13:03,118 La requête d’accès au plein écran a été refusée, car Element.requestFullScreen() n’a pas été appelée à l’intérieur d’un gestionnaire d’évènement généré par l’utilisateur. entry-es-module.min.js:3:9068

19:13:03,118 Uncaught (in promise) TypeError: Fullscreen request denied

(Refused because Element.requestFullScreen() not called inside an event handler for a user generated event)

Did not go full screen

Expected results:

open full screen the same it does with a mouseclick, touch or keyboard (TAB + Space)

The Bugbug bot thinks this bug should belong to the 'Core::DOM: UI Events & Focus Handling' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core

Interesting. I wonder if this type of input has been considered for the spec.

Severity: -- → S3
Flags: needinfo?(echen)

I feel it makes sense to treat GamePad input as a user gesture, but it is not clear on spec, there are some related discussions in https://github.com/w3c/gamepad/pull/107 and https://github.com/w3c/gamepad/issues/124.

Blocks: 1577516
Component: DOM: UI Events & Focus Handling → DOM: Device Interfaces
Flags: needinfo?(echen)
See Also: → 1679817
Summary: Cannot enter full screen mode by using a controller → Treat GamePad input as a user gesture so users can enter fullscreen mode by a controller

Any update on this? This seems to have been resolved in Chromium by considering a frame in which a gamepad input has been detected to have received a user gesture: https://bugs.chromium.org/p/chromium/issues/detail?id=381596

Could Firefox do something similar?

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