Make `HTMLEditor` aware of inputting line breaks in `contenteditable=plaintext-only`
Categories
(Core :: DOM: Editor, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox133 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(2 files)
Chrome inserts a line break with either:
- typing
Enter - typing
Shift+Enter execCommand("insertLineBreak")
Those cause input events whose inputType is insertLineBreak.
However, execCommand("insertParagraph") inserts an empty paragraph or split current paragraph as same as contenteditable=true. I'm not sure whether this is intentional.
| Assignee | ||
Comment 1•1 year ago
|
||
Safari also supports insertParagraph working as same as in contenteditable=true. So, we need to follow them.
| Assignee | ||
Comment 2•1 year ago
|
||
Chrome treats Enter key press as insertLineBreak instead of
insertParagraph. Additionally, Chrome handles insertParagraph command
work as same as when contenteditable=true. Therefore, HTMLEditor needs
to change the behavior at handling eKeyPress event.
Depends on D224184
| Assignee | ||
Comment 3•1 year ago
|
||
The behavior should be same as when contenteditable=true. Therefore,
this test checks only the basic behavior.
Depends on D224185
Comment 6•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f38500099558
https://hg.mozilla.org/mozilla-central/rev/3856ef423b91
Description
•