r1436 - branches/bxe_2_0/mozile

[email protected]
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Thu Dec 22 10:40:45 2005
New Revision: 1436

Modified:
   branches/bxe_2_0/mozile/mozCE.js
Log:
check attribtue contnet

Modified: branches/bxe_2_0/mozile/mozCE.js
==============================================================================
--- branches/bxe_2_0/mozile/mozCE.js	(original)
+++ branches/bxe_2_0/mozile/mozCE.js	Thu Dec 22 10:40:45 2005
@@ -206,10 +206,15 @@
 			var par = cssr.startContainer.parentNode.XMLNode._node;
 			
 			if (par.childNodes.length <= 1) {
-				var parpar = par.parentNode;
-				
-				var nextSibling = par.nextSibling;
-				parpar.removeChild(par);
+				// if attributenode
+				if (par.nodeType == 2) {
+					var parpar = par.ownerElement;
+					parpar.removeAttributeNode(par);
+				} else {
+					var parpar = par.parentNode;
+					var nextSibling = par.nextSibling;
+					parpar.removeChild(par);
+				}
 				if (!parpar.XMLNode.isNodeValid(true,2,true)) {
 					
 						var _new = parpar.insertBefore(parpar.ownerDocument.createElementNS(par.namespaceURI,par.localName),nextSibling);
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.