r1780 - in branches/bxe_2_0: js mozile
[email protected] Mon, 12 Nov 2007 13:47:26 +0100 (CET)
| Newsgroups | gmane.editors.bitflux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: chregu
Date: Mon Nov 12 13:47:25 2007
New Revision: 1780
Log:
further fixes for BXEB-53
whitespacee handling on delete
Modified:
branches/bxe_2_0/js/bxeFunctions.js
branches/bxe_2_0/mozile/mozCE.js
branches/bxe_2_0/mozile/mozilekb.js
Modified: branches/bxe_2_0/js/bxeFunctions.js
==============================================================================
--- branches/bxe_2_0/js/bxeFunctions.js (original)
+++ branches/bxe_2_0/js/bxeFunctions.js Mon Nov 12 13:47:25 2007
@@ -2847,7 +2847,7 @@
function bxe_checkEmptyParent(par) {
- par._node.betterNormalize();
+ //par._node.betterNormalize();
if (par._node.childNodes.length == 0) {
bxe_checkEmpty(par);
} else if (par.vdom && !par.vdom.bxeOnemptyAllowWhitespace && par.isWhitespaceOnly) {
Modified: branches/bxe_2_0/mozile/mozCE.js
==============================================================================
--- branches/bxe_2_0/mozile/mozCE.js (original)
+++ branches/bxe_2_0/mozile/mozCE.js Mon Nov 12 13:47:25 2007
@@ -196,7 +196,7 @@
var doTransform = false;
if(!cssr)
return;
-
+ var _posPlus = null;
if(cssr.collapsed) {
if (cssr.startContainer.nodeValue.strip().length == 1) {
try {
@@ -396,7 +396,7 @@
textNode.splitText(this.focusOffset);
}
textNode = textNode.splitText(this.anchorOffset);
- // delete last node
+ // delete last node
if (this.anchorNode != this.focusNode) {
//endxmlnode.betterNormalize();
endxmlnode.removeChild(endtextNode);
@@ -417,8 +417,8 @@
}
}
if (textNode.parentNode == xmlnode) {
+ var _prev = textNode.previousSibling;
xmlnode.removeChild(textNode);
- xmlnode.betterNormalize();
bxe_checkEmptyParent(xmlnode.XMLNode);
} else {
@@ -431,8 +431,11 @@
}
//this.selectEditableRange(cssr);
- if (this.focusNode.nodeValue.substr(this.focusOffset,1) == " ") {
- var _posPlus = this.anchorOffset;
+
+ if ( this.focusNode.nodeValue.substr(this.focusOffset,1) == " ") {
+ _posPlus = this.anchorOffset;
+ } else if (this.focusOffset >= this.focusNode.length && this.focusNode.nodeValue.substr(this.focusNode.length -1 ,1) == " ") {
+ _posPlus = this.focusNode.length;
}
this.removeAllRanges();
this.addRange(cssr.cloneRange());
Modified: branches/bxe_2_0/mozile/mozilekb.js
==============================================================================
--- branches/bxe_2_0/mozile/mozilekb.js (original)
+++ branches/bxe_2_0/mozile/mozilekb.js Mon Nov 12 13:47:25 2007
@@ -627,6 +627,7 @@
bxe_checkEmpty(_par.XMLNode,makeDefault);
} else {
_par.replaceChild(_par.ownerDocument.createTextNode(" "),xmlnode);
+ bxe_checkEmpty(_par.XMLNode,makeDefault);
}
}
--
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs