r1600 - in branches/bxe_2_0: js mozile

[email protected] Fri, 3 Nov 2006 08:57:51 +0100 (CET)
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Fri Nov  3 08:57:50 2006
New Revision: 1600

Modified:
   branches/bxe_2_0/js/bxeFunctions.js
   branches/bxe_2_0/mozile/mozCE.js
Log:
fix deleteion, when only one char


Modified: branches/bxe_2_0/js/bxeFunctions.js
==============================================================================
--- branches/bxe_2_0/js/bxeFunctions.js	(original)
+++ branches/bxe_2_0/js/bxeFunctions.js	Fri Nov  3 08:57:50 2006
@@ -2140,9 +2140,11 @@
 	}
 }
 String.prototype.strip = function() {
-    var stripspace = /^\s*((\S+\s*\S+)*)\s*$/;
+    var stripspace = /^\s*(\S.*)$/;
+	var stripspaceend = /^(.*\S)\s+$/;
 	try { 
-		return stripspace.exec(this)[1];
+		var _f = stripspace.exec(this)[1]
+		return stripspaceend.exec(_f)[1]
 	} catch(e) {
 		return this;
 	}

Modified: branches/bxe_2_0/mozile/mozCE.js
==============================================================================
--- branches/bxe_2_0/mozile/mozCE.js	(original)
+++ branches/bxe_2_0/mozile/mozCE.js	Fri Nov  3 08:57:50 2006
@@ -199,7 +199,7 @@
 
 	if(cssr.collapsed)
 	{
-		if (cssr.startContainer.length == 1) {
+		if (cssr.startContainer.nodeValue.strip().length == 1) {
 			try {
 			var sel = window.getSelection();
 			cssr = this.getEditableRange();
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs