r1759 - branches/bxe_2_0/mozile

[email protected] Fri, 14 Sep 2007 16:50:34 +0200 (CEST)
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Fri Sep 14 16:50:34 2007
New Revision: 1759

Log:
try to handle cells differently, when selections is over a cell

BXEB-41


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	Fri Sep 14 16:50:34 2007
@@ -326,15 +326,25 @@
 		if (xmlnode.betterNormalize) {
 			xmlnode.betterNormalize();
 		}
+		
+		
 		if (xmlnode.nodeType == 2) {
 			//FIXME 2.0
 			//xmlnode._node.value =  xmlnode._node.ownerElement.getContent();
 			cssr.extractContentsByCSS();
 			xmlnode.nodeValue =  this.anchorNode.nodeValue;
 		} else {
+			if (xmlnode.XMLNode.vdom && xmlnode.XMLNode.vdom.bxeTabletype == "table-cell") {
+				if (xmlnode.XMLNode._node != this.focusNode.parentNode.XMLNode._node ) {
+					this.collapse(this.anchorNode,1);
+					console.log(this.anchorNode.length);
+					this.extend(this.anchorNode,this.anchorNode.length);
+				}
+			}
 			var _position = bxe_getChildPosition(this.anchorNode);
 			
 			var textNode = xmlnode.childNodes[_position];
+			
 			// first delete all subnodes, if we have
 			if (this.anchorNode != this.focusNode) {
 				
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs