Bug 614988 - "ASSERTION: We should never try to use the editor if we're not initialized unless we're being initialized" should not apply to textarea's; r=bzbarsky a=roc

This commit is contained in:
Ehsan Akhgari 2010-11-26 15:48:45 -05:00
parent a408fd8bb9
commit f10d7e89cf
3 changed files with 12 additions and 2 deletions

View File

@ -0,0 +1,5 @@
<!DOCTYPE html>
<html>
<head><script>window.addEventListener("load", function() { var t = document.getElementById("t"); t.appendChild(t.previousSibling); }, false);</script></head>
<body><fieldset><legend></legend><textarea id="t"></textarea></fieldset></body>
</html>

View File

@ -23,3 +23,4 @@ load 596785-2.html
load 606430-1.html
load 602117.html
load 613027.html
load 614988-1.html

View File

@ -1713,8 +1713,12 @@ nsTextEditorState::SetValue(const nsAString& aValue, PRBool aUserInput)
mBoundFrame->SetFireChangeEventState(PR_TRUE);
}
NS_ASSERTION(mEditorInitialized || mInitializing,
"We should never try to use the editor if we're not initialized unless we're being initialized");
#ifdef DEBUG
if (IsSingleLineTextControl()) {
NS_ASSERTION(mEditorInitialized || mInitializing,
"We should never try to use the editor if we're not initialized unless we're being initialized");
}
#endif
nsAutoString currentValue;
if (!mEditorInitialized && IsSingleLineTextControl()) {