[Dojo-checkins] r1423 - trunk/src/widget

dojo-checkins at dojotoolkit.org dojo-checkins at dojotoolkit.org
Mon Sep 12 09:42:16 PDT 2005


Author: alex
Date: Mon Sep 12 09:42:14 2005
New Revision: 1423

Modified:
   trunk/src/widget/RichText.js
Log:
this should help alleviate Abe's reported memory leak


Modified: trunk/src/widget/RichText.js
==============================================================================
--- trunk/src/widget/RichText.js	(original)
+++ trunk/src/widget/RichText.js	Mon Sep 12 09:42:14 2005
@@ -694,12 +694,14 @@
 		// line height is squashed for iframes
 		if (this.iframe) { this.domNode.style.lineHeight = null; }
 		
-		if (save) { this.domNode.innerHTML = this.editNode.innerHTML; }
-		else {
-			while (this.domNode.hasChildNodes()) {
+		dojo.event.browser.clean(this.domNode);
+		if(save){
+			this.domNode.innerHTML = this.editNode.innerHTML; 
+		}else{
+			while(this.domNode.hasChildNodes()){
 				this.domNode.removeChild(this.domNode.firstChild);
 			}
-			while (this.savedContent.hasChildNodes()) {
+			while(this.savedContent.hasChildNodes()){
 				this.domNode.appendChild(this.savedContent.firstChild);
 			}
 		}


More information about the Dojo-checkins mailing list