r1621 - branches/bxe_2_0/mozile
[email protected] Thu, 9 Nov 2006 15:51:43 +0100 (CET)
| Newsgroups | gmane.editors.bitflux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: chregu
Date: Thu Nov 9 15:51:42 2006
New Revision: 1621
Modified:
branches/bxe_2_0/mozile/mozilekb.js
Log:
try this fix
Modified: branches/bxe_2_0/mozile/mozilekb.js
==============================================================================
--- branches/bxe_2_0/mozile/mozilekb.js (original)
+++ branches/bxe_2_0/mozile/mozilekb.js Thu Nov 9 15:51:42 2006
@@ -638,6 +638,7 @@
if (sel.anchorNode == sel.focusNode) {
if (sel.focusOffset >= sel.anchorNode.nodeValue.strip().length) {
+
var xmlnode = bxe_getXMLNodeByHTMLNodeRecursive(sel.anchorNode);
//xmlnode.parentNode.appendChild(xmlnode.ownerDocument.createTextNode(" "));
var _par = bxe_getXMLNodeByHTMLNodeRecursive(sel.anchorNode.parentNode);
@@ -652,7 +653,11 @@
//sel.anchorNode.nodeValue = _par.nodeValue;
//_par.XMLNode.makeDefaultNodes();
} else {
- _par.removeChild(xmlnode);
+ if (_par.childNodes.length == 1) {
+ _par.removeChild(_par.firstChild);
+ } else {
+ _par.removeChild(xmlnode);
+ }
_par.XMLNode.makeDefaultNodes();
}
--
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs