r1710 - branches/bxe_2_0/mozile
[email protected] Sun, 12 Aug 2007 16:55:51 +0200 (CEST)
| Newsgroups | gmane.editors.bitflux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: chregu
Date: Sun Aug 12 16:55:50 2007
New Revision: 1710
Log:
try a fix for BXEB-27
Modified:
branches/bxe_2_0/mozile/mozCE.js
Modified: branches/bxe_2_0/mozile/mozCE.js
==============================================================================
--- branches/bxe_2_0/mozile/mozCE.js (original)
+++ branches/bxe_2_0/mozile/mozCE.js Sun Aug 12 16:55:50 2007
@@ -361,16 +361,25 @@
var oldnode;
node = walker.nextNode();
do {
-
if (node == endtextNode) {
break;
}
oldnode = node;
- node = walker.nextNode();
if (!(oldnode.compareDocumentPosition(endtextNode) & Node.DOCUMENT_POSITION_CONTAINED_BY)) {
+ // if children, delete all of them first
+ if (oldnode.hasChildNodes()) {
+ while (oldnode.firstChild) {
+ oldnode.removeChild(oldnode.firstChild);
+ }
+ }
+ node = walker.nextNode();
+
oldnode.parentNode.removeChild(oldnode);
+ } else {
+ node = walker.nextNode();
}
+
} while(node);
// merge nodes
--
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs