r1592 - branches/bxe_2_0/mozile
[email protected] Mon, 30 Oct 2006 16:04:51 +0100 (CET)
| Newsgroups | gmane.editors.bitflux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: chregu
Date: Mon Oct 30 16:04:50 2006
New Revision: 1592
Modified:
branches/bxe_2_0/mozile/mozilekb.js
Log:
better check for fully selected nodes
Modified: branches/bxe_2_0/mozile/mozilekb.js
==============================================================================
--- branches/bxe_2_0/mozile/mozilekb.js (original)
+++ branches/bxe_2_0/mozile/mozilekb.js Mon Oct 30 16:04:50 2006
@@ -654,13 +654,11 @@
if (sel.anchorNode.nodeType == 3 && sel.anchorOffset == 0) {
// if only one textnode and fully selected
if (sel.anchorNode == sel.focusNode) {
- if (sel.focusOffset == sel.anchorNode.nodeValue.strip().length) {
-
+ if (sel.focusOffset >= sel.anchorNode.nodeValue.strip().length) {
var xmlnode = bxe_getXMLNodeByHTMLNode(sel.anchorNode);
//xmlnode.parentNode.appendChild(xmlnode.ownerDocument.createTextNode(" "));
var _par = xmlnode.parentNode;
if (_par) {
-
_par.removeChild(xmlnode);
_par.XMLNode.makeDefaultNodes();
@@ -672,7 +670,6 @@
sel.deleteSelection(false);
}
} else {
-
bxe_history_snapshot();
sel.deleteSelection(backspace);
--
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs