Open Bug 1916279 Opened 1 year ago Updated 1 year ago

Escape key does not fire keyup when exiting from the full screen mode of macOS window

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

Firefox 129
All
macOS
defect

Tracking

()

People

(Reporter: benni.vetter, Unassigned)

References

Details

Steps to reproduce:

  • On macOS (not Windows), in Firefox, open a webpage with window.addEvententlistener('keydown', ...) and window.addEvententlistener('keyup', ...)
  • "Enter Full Screen" - via green window button or Shift + Cmd + F
  • Press the escape key

Can also be tried with the logger here: https://bitbof.github.io/browser-bug-demos/2024-09-02-firefox-mac-escape-key/

Actual results:

Does not fire keyup for escape key

Expected results:

Fires keydown and keyup for escape key

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

:masayuki can you investigate, please?

Flags: needinfo?(masayuki)

Although I don't know why Chrome does not exit from the full screen mode with Escape key press, Safari does it and Safari does not fire keyup only in this case too. So, I think that it's consumed by OS before we handle it. However, it could be possible to handle it with raw event hook. See bug 1299553 for the detail.

Severity: -- → S3
Flags: needinfo?(masayuki)
OS: Unspecified → macOS
Hardware: Unspecified → All
See Also: → 1299553
Summary: Escape key does not fire keyup → Escape key does not fire keyup when exiting from the full screen mode of macOS window
Status: UNCONFIRMED → NEW
Ever confirmed: true

In Chrome, a website-initiated fullscreen (with element.requestFullscreen()) is exited with an Esc keypress (and it doesn't fire either keydown or keyup). A user-initiated fullscreen requires you to press and hold Esc.

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