Closed Bug 1072137 Opened 10 years ago Closed 10 years ago

"Assertion failure: editingHost == mEditableNode (found editing host should be mEditableNode)"

Categories

(Core :: DOM: Editor, defect)

x86_64
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: jruderman, Assigned: masayuki)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(4 files)

Attached file testcase (requires focus) (deleted) —
Assertion failure: editingHost == mEditableNode (found editing host should be mEditableNode), at dom/events/IMEContentObserver.cpp:122

This assertion was added in http://hg.mozilla.org/mozilla-central/rev/2cfc400dd0ad (bug 496360 part 2)
Attached file stack+ (deleted) —
Blocks: 496360
I'm trying to fix this...
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Attached patch part.0 Add tests (deleted) — Splinter Review
Attachment #8494921 - Flags: review?(bugs)
This bug tells us another bug. Even if an <input> element or a <textarea> element in contenteditable element is focused, IMEContentObserver observes its ancestor (i.e., editing host of the contenteditable editor). Of course, when <input> or <textarea> has focus, IMEContentObserver should observe the focused editor.

Strictly speaking, this patch is NOT correct. This patch checks if found editable node in GetRootEditableNode() has independent selection. Currently, looks like <input>, <textarea> and <select> has independent selection. However, <select> returns false for IsEditable(). Therefore, this currently works.

I think that we should create stabler API for this. Perhaps, in nsIEditor? Then, focused editor should return its editable root content or node.

If you'd like me to fix this strictly here, I'll try to do it.
Attachment #8494923 - Flags: review?(bugs)
Attachment #8494921 - Flags: review?(bugs) → review+
Comment on attachment 8494923 [details] [diff] [review]
part.1 Stop searching root editable node if a node has independent selection


>+      // If the node has independent selection like <input type="text"> or
>+      // <textarea>, the node should be the root editable node for aContent.
>+      // FYI: <select> element also has independent selection but IsEditable()
>+      //      returns false.
>+      // XXX: If somebody will add new editable element which has independent
>+      //      selection but doesn't own editor, we need more check here.
if somebody adds ...we'll need more checks here.



I think I can live with this patch for now :)
Attachment #8494923 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/2bfce4ae91e6
https://hg.mozilla.org/mozilla-central/rev/049f2e6b043d
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: