Updating `<br>` to a padding one cannot cause text change notification to IME
Categories
(Core :: DOM: Editor, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox128 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Keywords: inputmethod)
Attachments
(1 external file)
When <br> element is set to a padding one, ContentEventHandler treats it as hidden. However, updating the type from or to padding one is not observable from IMEContentObserver. Therefore, when a connect <br> element becomes a padding <br>, it's not notified IME but it should cause a removing text notification.
This might cause bug 1824143.
| Assignee | ||
Comment 1•2 years ago
|
||
Currently, the <br> element type -- whether normal <br> element or padding
<br> element for empty editor or last line -- is managed by the flags of
nsINode. Therefore, changing the flag does not cause mutation, so
IMEContentObserver cannot observe the type changes. However,
ContentEventHandler treats the padding <br> elements as invisible.
Therefore, when a <br> element becomes a padding one, IMEContentObserver
needs to notify IME of atext removed notification, and also when a <br>
element becomes a normal one (i.e., visible), IMEContentObserver needs to
notify IME of a text added notification.
Therefore, this patch makes EditorBase disconnect the <br> element
temporarily to make IMEContentObserver observable the type change.
Depends on D211698
Description
•