Author: nbelaevski
Date: 2008-06-12 11:18:37 -0400 (Thu, 12 Jun 2008)
New Revision: 9020
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-3694
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
---
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-06-12
15:10:44 UTC (rev 9019)
+++
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-06-12
15:18:37 UTC (rev 9020)
@@ -262,7 +262,15 @@
this.update.component = this;
this["rich:destructor"] = "destroy";
- document.body.insertBefore(this.update, document.body.firstChild);
+ var scripts = temp.getElementsByTagName('script');
+ for (var i = 0; i < scripts.length; i++) {
+ var script = scripts[i];
+ if (script.parentNode) {
+ script.parentNode.removeChild(script);
+ }
+ }
+
+ document.body.insertBefore(this.update, document.body.firstChild);
this.initialized = true;
}
this.wasBlur = false;