r1651 - branches/bxe_2_0/mozile

[email protected] Thu, 14 Dec 2006 07:37:33 +0100 (CET)
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Thu Dec 14 07:37:31 2006
New Revision: 1651

Modified:
   branches/bxe_2_0/mozile/mozilekb.js
Log:
check if element can have text...

Modified: branches/bxe_2_0/mozile/mozilekb.js
==============================================================================
--- branches/bxe_2_0/mozile/mozilekb.js	(original)
+++ branches/bxe_2_0/mozile/mozilekb.js	Thu Dec 14 07:37:31 2006
@@ -520,6 +520,11 @@
 			}
 
 		}
+		
+		var lala = bxe_getXMLNodeByHTMLNodeRecursive(par);
+		if (!lala.XMLNode.canHaveText) {
+			return false;
+		}
 		var startC = cssr.startContainer;
 		
 		var startOff = cssr.startOffset;
@@ -540,7 +545,6 @@
 			startC.insertData(startOff, _ch);
 		}
 		sel.collapse(startC,startOff+1);
-		var lala = bxe_getXMLNodeByHTMLNodeRecursive(par);
 		if (lala.nodeType == 2 ) {
 			
 			lala.value =  par.getContent();
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs