r1430 - branches/bxe_2_0/mozile

[email protected]
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Wed Dec 21 11:08:47 2005
New Revision: 1430

Modified:
   branches/bxe_2_0/mozile/mozCE.js
Log:
create default nodes, if a obligatory one is deleted

Modified: branches/bxe_2_0/mozile/mozCE.js
==============================================================================
--- branches/bxe_2_0/mozile/mozCE.js	(original)
+++ branches/bxe_2_0/mozile/mozCE.js	Wed Dec 21 11:08:47 2005
@@ -208,17 +208,22 @@
 			if (par.childNodes.length <= 1) {
 				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);
+						_new.XMLNode = _new.getXMLNode();
+						_new.XMLNode.makeDefaultNodes();
+				}
 				parpar.normalize();
 				var _h = par.XMLNode._htmlnode;
 				var _pref = _h.previousSibling;
 				_h.parentNode.removeChild(_h);
 				if (_pref) {
 					sel.collapse(_pref,_pref.nodeValue.length);
-					
-					
 				}
-				parpar.XMLNode.isNodeValid(true,2,true);
+				
 				sel.collapseToStart();
 				
 				bxe_Transform();
-- 
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.