Skip to content

Fullscreen Toggle Issue in Firefox (F11) #2716

@hedi30

Description

@hedi30

Bug Report: [Fullscreen Toggle Issue in Firefox]

fullscreen-bug.mp4

Description

When toggling fullscreen mode using F11 in Firefox, subsequent attempts to enter fullscreen after exiting result in an error. The workaround is to click on the game before pressing F11 again. Shift+f works consistently without issues.

Steps to Reproduce

  1. Open the application in Firefox
  2. Press F11 to enter fullscreen mode
  3. Press F11 to exit fullscreen mode
  4. Press F11 again to attempt re-entering fullscreen
  5. Observe the error in console

Expected Behavior

Fullscreen mode should toggle on/off consistently with each F11 press.

Actual Behavior

After exiting fullscreen, attempting to re-enter fullscreen with F11 produces the following error:

Request for fullscreen was denied because Element.requestFullscreen() was not called from inside a short running user-generated event handler. fullscreen.ts:22:23
Error toggling fullscreen: TypeError: Fullscreen request denied
toggle fullscreen.ts:22
keyDownAction script.ts:127
ts script.ts:158
jQuery 2
fullscreen.ts:28:11
Phaser.ScaleManager: requestFullscreen failed or device does not support the Fullscreen API

Workaround

  1. After exiting fullscreen, click on the game window
  2. Then press F11 - this successfully enters fullscreen mode
  3. Alternatively, Shift+F works consistently without needing to click first

Additional Information

  • Browser: Firefox (version 137.0.2)
  • OS: [Arch Linux]
  • Screen recording available demonstrating the issue

Metadata

Metadata

Assignees

Labels

codingThis issue requires some programminginputDeals with hotkeys, interaction & accessibility

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions