From d9fb09c1d6b0033700fb48aaa35753ae13253d07 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 4 Nov 2010 01:30:59 +0000 Subject: [PATCH] fix handling of tab switching in Fx4 --- chrome/content/zotero/browser.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js index 50a408e6d..f7b290299 100644 --- a/chrome/content/zotero/browser.js +++ b/chrome/content/zotero/browser.js @@ -257,19 +257,19 @@ var Zotero_Browser = new function() { * When chrome loads, register our event handlers with the appropriate interfaces */ function chromeLoad() { - this.tabbrowser = document.getElementById("content"); + this.tabbrowser = gBrowser; this.appcontent = document.getElementById("appcontent"); this.statusImage = document.getElementById("zotero-status-image"); // this gives us onLocationChange, for updating when tabs are switched/created - this.tabbrowser.addEventListener("TabClose", + gBrowser.tabContainer.addEventListener("TabClose", function(e) { //Zotero.debug("TabClose"); Zotero_Browser.tabClose(e); }, false); - this.tabbrowser.addEventListener("TabSelect", + gBrowser.tabContainer.addEventListener("TabSelect", function(e) { - //Zotero.debug("TabSelect"); + Zotero.debug("TabSelect"); Zotero_Browser.updateStatus(); }, false); // this is for pageshow, for updating the status of the book icon