mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1090616. Don't assume that the nodes we just pasted are still in the DOM, because mutation listeners suck like that. r=smaug
This commit is contained in:
parent
2fdca6c6ed
commit
5821f72d3c
@ -655,6 +655,9 @@ nsHTMLEditor::DoInsertHTMLWithContext(const nsAString & aInputString,
|
||||
{
|
||||
tmp = selNode;
|
||||
selNode = GetNodeLocation(tmp, &selOffset);
|
||||
// selNode might be null in case a mutation listener removed
|
||||
// the stuff we just inserted from the DOM.
|
||||
NS_ENSURE_STATE(selNode);
|
||||
++selOffset; // want to be *after* last leaf node in paste
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user