From 03f8f111569d893e93a1b38debc9942c5afd1e92 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 21 Dec 2010 03:45:27 +0000 Subject: [PATCH] fix display glitches in Fx 4 --- chrome/content/zotero/overlay.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index c90daf561..5127e7c4c 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -123,7 +123,16 @@ var ZoteroPane = new function() document.getElementById('zotero-pane-stack').setAttribute('platform', 'win'); } - if(Zotero.isFx35) document.documentElement.setAttribute("moz-version", "3.5"); + if(Zotero.isFx4) { + // hack, since Fx 4 no longer sets active, and the reverse in polarity of the preferred + // property makes things painful to handle otherwise + // DEBUG: remove this once we only support Fx 4 + document.documentElement.setAttribute("active", "true"); + window.addEventListener("focus", + function() { document.documentElement.setAttribute("active", "true") }, false); + window.addEventListener("blur", + function() { document.documentElement.removeAttribute("active") }, false); + } //Initialize collections view this.collectionsView = new Zotero.CollectionTreeView();