Open Bug 1838387 Opened 2 years ago Updated 2 years ago

The space key won't insert a space character in a summary element inside an editable host element

Categories

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

Firefox 114
defect

Tracking

()

UNCONFIRMED

People

(Reporter: spocke, Unassigned)

References

Details

Attachments

(1 file)

Steps to reproduce:

  1. Opened a HTML page with an editable summary element (attached to this ticket)
  2. Placed the caret inside the editable summary element
  3. Pressed the space key on the keyboard

Actual results:

Noticed that it toggles the open/closed state of the parent details element.

Expected results:

It should insert the space character since the summary element is editable.

The Bugbug bot thinks this bug should belong to the 'Core::Layout' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Layout
Product: Firefox → Core

I guess the event-handling code should probably check if the element is editable, and if so, not treat the <space> as activating the toggle behavior but just pass it through to the editor like other keystrokes.

Component: Layout → DOM: Events

I tried this in Chrome, and it also has some strange behavior where I could reproduce this behavior with some frantic clicking. But I guess it should be fixed.

I guess you'll know the most about this Masayuki?

Severity: -- → S3
Flags: needinfo?(masayuki)
Priority: -- → P2

It's currently tested by WPT and their results in all browsers are here. So handled by the builtin editor or the <summary> depends on which one has focus and the behavior is compatible with Chrome. Therefore, we cannot touch the behavior.

On the other hand, I realized that clicking in an editable <summary>, Firefox makes the <summary> focused, but Chrome makes the editing host focused. I think that Chrome's behavior is better and that makes the reporter confused.

Component: DOM: Events → DOM: UI Events & Focus Handling
Flags: needinfo?(masayuki)
See Also: → 1822860
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: