r1336 - in trunk/firefox_extension: . content

[email protected]
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Tue Jun  7 15:17:47 2005
New Revision: 1336

Modified:
   trunk/firefox_extension/bxehelper-0.1.xpi
   trunk/firefox_extension/bxehelper.xpi
   trunk/firefox_extension/content/caret.js
Log:
more general caret setting

Modified: trunk/firefox_extension/bxehelper-0.1.xpi
==============================================================================
Binary files. No diff available.

Modified: trunk/firefox_extension/bxehelper.xpi
==============================================================================
Binary files. No diff available.

Modified: trunk/firefox_extension/content/caret.js
==============================================================================
--- trunk/firefox_extension/content/caret.js	(original)
+++ trunk/firefox_extension/content/caret.js	Tue Jun  7 15:17:47 2005
@@ -1,25 +1,33 @@
 document.addEventListener("click", bxehelper_mouse, false);
 
+
 function bxehelper_mouse(e) {
-	var target = e.target.parentElement;
-	if(target && target.userModifiable ) {
-		if(e.target.tagName=="tabbrowser") {
-			return;
-		}
-		// if the target of the click is one of these, then don't change the status of the toolbar
-		var protect = new Array( 'toolbar', 'toolbarbutton', 'menuitem', 'menu', 'colorpicker');
-		for(var i=0; i<protect.length; i++) {
-			if(e.target.tagName==protect[i]) {
+	try {
+	if (e.target.ownerDocument.defaultView.BXENS) {
+		var target = e.target.parentNode;
+		if(target && target.userModifiable ) {
+			if(e.target.tagName=="tabbrowser") {
 				return;
 			}
+			// if the target of the click is one of these, then don't change the status of the toolbar
+			var protect = new Array( 'toolbar', 'toolbarbutton', 'menuitem', 'menu', 'colorpicker');
+			for(var i=0; i<protect.length; i++) {
+				if(e.target.tagName==protect[i]) {
+					return;
+				}
+			}
+			
+			
+			bxehelper_setCaret();
 		}
-		
-		
-		bxehelper_setCaret();
 	} else {
 		bxehelper_removeCaret();
 	}
-
+	} catch (e) {
+		dump("bxehelper catched\n");
+	}
+	
+	
 }
 
 function bxehelper_removeCaret() {
-- 
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.