Author: nbelaevski
Date: 2008-06-09 19:42:04 -0400 (Mon, 09 Jun 2008)
New Revision: 8961
Modified:
branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-3646
Modified:
branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
---
branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-06-09
22:40:17 UTC (rev 8960)
+++
branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-06-09
23:42:04 UTC (rev 8961)
@@ -225,7 +225,16 @@
var temp = this.update.cloneNode(true);
this.update.parentNode.removeChild(this.update);
this.update = temp;
- document.body.insertBefore(this.update, document.body.firstChild);
+
+ var scripts = Element.select(temp, '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;