Open
Bug 1454885
Opened 7 years ago
Updated 2 years ago
Pressing Enter in <p contenteditable="false"><span contenteditable>foo</span></p> causes splitting non-editable <p> too
Categories
(Core :: DOM: Editor, defect, P3)
Core
DOM: Editor
Tracking
()
NEW
| Tracking | Status | |
|---|---|---|
| firefox61 | --- | affected |
People
(Reporter: masayuki, Unassigned)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [h2review-noted])
STR:
1. Go to https://d-toybox.com/studio/lib/input_event_viewer.html
2. Set <textarea> value in "Choose editor type" section to |<p contentediable="false"><span contenteditable>editable span element</span></p>|.
3. Click |<div contenteditable>|
4. Move focus to middle of "editable span element" in the below editor.
5. Press Enter key.
Then, Firefox's result is, for example:
<p contenteditable="false"><span contenteditable="">editable sp</span></p><p contenteditable="false"><span contenteditable="">an element</span></p>
Perhaps, just inserting <br> element is expected behavior since elements whose contenteditable is false shouldn't be split by user operation.
FYI: Edge and Chromium's behavior are also odd.
Updated•7 years ago
|
Priority: -- → P3
Updated•5 years ago
|
Whiteboard: [h2review-noted]
Updated•3 years ago
|
Severity: normal → S3
Comment 1•2 years ago
|
||
Is this still a bug? I tried the STR in https://software.hixie.ch/utilities/js/live-dom-viewer/saved/11652 and I see a <br> being inserted.
| Reporter | ||
Comment 2•2 years ago
|
||
(In reply to James Graham [:jgraham] from comment #1)
Is this still a bug? I tried the STR in https://software.hixie.ch/utilities/js/live-dom-viewer/saved/11652 and I see a
<br>being inserted.
No, the test case above is, the DOM is like this:
<div contenteditable="">
<p contenteditable="false">
<span contenteditable="">
#text
Currently, HTMLEditor handles insertParagraph without checking parent contenteditable="false" at caret. Therefore, it's treated as an insertParagraph in a <div> rather than the inner <span contenteditable="">.
| Reporter | ||
Updated•2 years ago
|
Blocks: contenteditable-false
You need to log in
before you can comment on or make changes to this bug.
Description
•