r1488 - in branches/bxe_2_0: . js
[email protected] Fri, 19 May 2006 11:38:33 +0200 (CEST)
| Newsgroups | gmane.editors.bitflux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: chregu
Date: Fri May 19 11:38:32 2006
New Revision: 1488
Modified:
branches/bxe_2_0/bxeLoader.js
branches/bxe_2_0/js/bxeFunctions.js
Log:
set cursor on startup to first element
Modified: branches/bxe_2_0/bxeLoader.js
==============================================================================
--- branches/bxe_2_0/bxeLoader.js (original)
+++ branches/bxe_2_0/bxeLoader.js Fri May 19 11:38:32 2006
@@ -386,6 +386,7 @@
document.addEventListener("contextmenu",bxe_ContextMenuEvent, false);
bxe_context_menu = new Widget_ContextMenu();
+
}
function validation_loaded(vdom) {
@@ -406,7 +407,8 @@
debug ("endTime : " + endTimer);
dump ("Total Start Time: " + (endTimer - startTimer)/1000 + " sec\n");
//for some strange reason, bxe_Transform only works correctly, if we do that asynchron later
- window.setTimeout("bxe_Transform()",1);
+ window.setTimeout("bxe_Transform_first()",1);
+
}
Modified: branches/bxe_2_0/js/bxeFunctions.js
==============================================================================
--- branches/bxe_2_0/js/bxeFunctions.js (original)
+++ branches/bxe_2_0/js/bxeFunctions.js Fri May 19 11:38:32 2006
@@ -2286,6 +2286,30 @@
bxe_history_snapshot();
dump ("history snapshot " + (new Date() - startTimer)/1000 + " sec\n");
+
+
+}
+
+
+function bxe_Transform_first() {
+ bxe_Transform();
+ var sel = window.getSelection();
+ var walker = document.createTreeWalker(
+ document.documentElement, NodeFilter.SHOW_ELEMENT,
+ null,
+ true);
+
+ node = walker.nextNode();
+
+ do {
+ if (node.userModifiable && node.XMLNode && node.XMLNode.canHaveText) {
+ sel.collapse(node.firstChild,0);
+ bxe_updateXPath(node);
+ break;
+ }
+ node = walker.nextNode();
+
+ } while(node);
}
function bxe_getXMLNodeByHTMLNode(node) {
--
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs