diff --git a/mozilla/content/base/src/nsGenericDOMDataNode.cpp b/mozilla/content/base/src/nsGenericDOMDataNode.cpp index 5c8c04e1a75..884bd15f62c 100644 --- a/mozilla/content/base/src/nsGenericDOMDataNode.cpp +++ b/mozilla/content/base/src/nsGenericDOMDataNode.cpp @@ -470,6 +470,14 @@ nsGenericDOMDataNode::SetTextInternal(PRUint32 aOffset, PRUint32 aCount, // Notify observers if (aNotify) { + CharacterDataChangeInfo info = { + aOffset == textLength, + aOffset, + endOffset, + aLength + }; + nsNodeUtils::CharacterDataChanged(this, &info); + if (haveMutationListeners) { nsMutationEvent mutation(PR_TRUE, NS_MUTATION_CHARACTERDATAMODIFIED); @@ -483,14 +491,6 @@ nsGenericDOMDataNode::SetTextInternal(PRUint32 aOffset, PRUint32 aCount, mozAutoSubtreeModified subtree(GetOwnerDoc(), this); nsEventDispatcher::Dispatch(this, nsnull, &mutation); } - - CharacterDataChangeInfo info = { - aOffset == textLength, - aOffset, - endOffset, - aLength - }; - nsNodeUtils::CharacterDataChanged(this, &info); } return NS_OK;