Open
Bug 1193517
Opened 11 years ago
Updated 4 years ago
contentEditable container tag reappear when removed with "removeChild" reappears on first character inserted
Categories
(Core :: DOM: Editor, defect)
Tracking
()
UNCONFIRMED
People
(Reporter: brunoaiss, Unassigned)
References
Details
Attachments
(1 file)
|
4.95 KB,
text/html
|
Details |
As far as I could tell,
This is a bug related to when the user has the caret outside all text nodes and inside a certain HTMLElement and the HTMLElement where the cursor is is removed dynamically.
I attached what I believe to be a nearly minimal case required to show the point and to get the bug.
How to test:
1. Open the page I attached.
2. Wait ~1.5s while some interaction is simulated by the javascript included.
3. Press `backspace`(x2)
1st clears the TextNode,
2nd is captured by js and the whole container is removed.
4.Type something.
What you get:
`<code></code>` wraps around the text you just typed.
What I expected:
A new TextNode wrapping the text I just wrote (no new HTMLELement).
That, because the caret is already inside a block-level tag (in this case, `<p>` tag).
Additionally, there doesn't seem to be any workaround to this besides capturing the keypress and then removing the newly created HTMLElement that has spawned when the user typed something.
Worst thing is that whether or not that `<code>` should is correctly placed there is undecidable by a WYSIWYG editor.
Attachment #8646581 -
Flags: feedback?
Blocks: contenteditable
Comment 1•9 years ago
|
||
Comment on attachment 8646581 [details]
Test case of the issue I'm encountering
reset feedback flag that user mistakes this flag usage
Attachment #8646581 -
Flags: feedback?
Updated•4 years ago
|
Severity: normal → S3
Does this bug appear to be solved now?
I can't seem to be able to reproduce it anymore.
You need to log in
before you can comment on or make changes to this bug.
Description
•