# HG changeset patch # User Aurelien Campeas # Date 1262707469 -3600 # Node ID b2826afdaf8cfe4d1c3d98c24c284760bc468a1c # Parent 0198acbae080093f26ff67f43f1c5fcec25d1dfa fix stripEmptyTextNodes for IE (part of #615337) this does not seem to make the function really work but it does not fail any more diff -r 0198acbae080 -r b2826afdaf8c web/data/cubicweb.ajax.js --- a/web/data/cubicweb.ajax.js Mon Jan 04 19:02:09 2010 +0100 +++ b/web/data/cubicweb.ajax.js Tue Jan 05 17:04:29 2010 +0100 @@ -424,11 +424,16 @@ * takes a list of DOM nodes and removes all empty text nodes */ function stripEmptyTextNodes(nodelist) { + /* this DROPS empty text nodes */ var stripped = []; for (var i=0; i < nodelist.length; i++) { var node = nodelist[i]; - if (isTextNode(node) && !node.textContent.strip()) { - continue; + if (isTextNode(node)) { + /* all browsers but FF -> innerText, FF -> textContent */ + var text = node.innerText || node.textContent; + if (text && !text.strip()) { + continue; + } } else { stripped.push(node); }