Closed Bug 1849048 Opened 1 year ago Closed 4 months ago

On MacOS, when focus is in a contenteditable element inside of a shadow dom, keyboard shortcuts are being incorrectly handled by the browser

Categories

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

Firefox 116
Unspecified
macOS
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: me, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/116.0

Steps to reproduce:

On macOS:

Create a shadow dom.

Create a contenteditable element inside of the shadow dom.

Set focus inside of the contenteditable element.

Press Cmd+Left.

Reproduction here: https://tehshrike.github.io/firefox-keyboard-shortcuts-in-contenteditable-inside-shadow-dom/

Actual results:

Firefox reacts to the Cmd+Left keypress and navigates to the previous location in the browser history.

Expected results:

The cursor should have moved to the beginning of the line.

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 correct in case you think the bot is wrong.

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

Sean, is this a known symptom to you?

Flags: needinfo?(sefeng)

My employer is shipping an app this year that will include a text editor inside of a shadow dom element, unless this bug is fixed, that app will not work well in Firefox by default.

I couldn't reproduce this on Win11.

OS: Unspecified → macOS
Summary: When focus is in a contenteditable element inside of a shadow dom, keyboard shortcuts are being incorrectly handled by the browser → On MacOS, when focus is in a contenteditable element inside of a shadow dom, keyboard shortcuts are being incorrectly handled by the browser

I can no longer reproduce this on macOS as of Firefox 122.0.1.

(In reply to TehShrike from comment #5)

I can no longer reproduce this on macOS as of Firefox 122.0.1.

Thank you for getting back here! Glad to know the issue is fixed on your end.

Status: UNCONFIRMED → RESOLVED
Closed: 4 months ago
Flags: needinfo?(sefeng)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.