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)
Tracking
()
People
(Reporter: spocke, Unassigned)
References
Details
Attachments
(1 file)
161 bytes,
text/html
|
Details |
Steps to reproduce:
- Opened a HTML page with an editable summary element (attached to this ticket)
- Placed the caret inside the editable summary element
- 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.
Comment 1•2 years ago
|
||
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.
Comment 2•2 years ago
|
||
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.
Comment 3•2 years ago
|
||
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?
Comment 4•2 years ago
|
||
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.
Description
•