Author: nbelaevski
Date: 2009-06-09 07:46:03 -0400 (Tue, 09 Jun 2009)
New Revision: 14564
Modified:
branches/community/3.3.X/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
https://jira.jboss.org/jira/browse/RF-5630
Modified: branches/community/3.3.X/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
---
branches/community/3.3.X/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2009-06-09
09:58:40 UTC (rev 14563)
+++
branches/community/3.3.X/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2009-06-09
11:46:03 UTC (rev 14564)
@@ -12,6 +12,8 @@
A4J.AJAX.Stub = function() {};
+A4J.AJAX.isWebKit = navigator.userAgent.search(/( AppleWebKit\/)([^ ]+)/) != -1;
+
/**
* XMLHttp transport class - incapsulate most of client-specifiv functions for call
server requests.
*/
@@ -392,6 +394,14 @@
// need to check for firstChild due to opera 8 bug with hasChildNodes
Sarissa.clearChildNodes(oldnode);
+ if (A4J.AJAX.isWebKit) {
+ try {
+ newnode.normalize();
+ } catch (e) {
+ LOG.error("Node normalization failed " + e.message);
+ }
+ }
+
var importednode = window.document.importNode(newnode, true);
//importednode.innerHTML = importednode.innerHTML;
LOG.debug("Replace content of node by replaceChild()");