r1300 - branches/bxe_2_0/js

[email protected]
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Wed May  4 17:05:56 2005
New Revision: 1300

Modified:
   branches/bxe_2_0/js/bxeFunctions.js
Log:
another try/catch for not working selection

Modified: branches/bxe_2_0/js/bxeFunctions.js
==============================================================================
--- branches/bxe_2_0/js/bxeFunctions.js	(original)
+++ branches/bxe_2_0/js/bxeFunctions.js	Wed May  4 17:05:56 2005
@@ -517,6 +517,7 @@
 		var _node = bxe_config.xmldoc.createElementNS(e.additionalInfo.namespaceURI,e.additionalInfo.localName);
 		var xmlnode = bxe_getXMLNodeByHTMLNode(sel.anchorNode.parentNode);
 		xmlnode.betterNormalize();
+		//FIXME: switch focus and anchor, if needed
 		var _position = bxe_getChildPosition(sel.anchorNode);
 		xmlnode.childNodes[_position].splitText(sel.focusOffset);
 		xmlnode.childNodes[_position].splitText(sel.anchorOffset);
@@ -1116,7 +1117,7 @@
 	win.document.writeln("<html>");
 	win.document.writeln("<body>");
 
-    win.document.writeln("<pre>");
+    win.document.writeln("<pre2>");
 	if (typeof string == "string") {
 		win.document.writeln(string.replace(/</g,"&lt;"));
 	}
@@ -2221,7 +2222,11 @@
 			sel.collapse(_topNode.nextSibling,0);
 		}
 	} else {
+		try {
 		sel.collapse(_topNode.childNodes[_childPosition], _offset);
+		catch(e) {
+			//didn't work
+		}
 	}
 	
 	dump ("cursor selection " + (new Date() - startTimer)/1000 + " sec\n");
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.