From ecb8cb140d16651440a3a14fc952051d501c9145 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 18 Apr 2013 03:29:20 -0400 Subject: [PATCH] Don't fire explicit styleChanged event on load Otherwise, the bottom of the document preferences window can be cut off the first time it is displayed. A styleChanged event is still fired after setting the selection. --- chrome/content/zotero/bibliography.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/bibliography.js b/chrome/content/zotero/bibliography.js index f68dfe2d8..c61be77be 100644 --- a/chrome/content/zotero/bibliography.js +++ b/chrome/content/zotero/bibliography.js @@ -88,10 +88,10 @@ var Zotero_File_Interface_Bibliography = new function() { } // Has to be async to work properly - setTimeout(function () { + window.setTimeout(function () { listbox.ensureIndexIsVisible(selectIndex); listbox.selectedIndex = selectIndex; - }); + }, 0); // ONLY FOR bibliography.xul: export options if(document.getElementById("save-as-rtf")) { @@ -119,8 +119,7 @@ var Zotero_File_Interface_Bibliography = new function() { // bookmarks text if(document.getElementById("displayAs")) { if(_io.useEndnotes && _io.useEndnotes == 1) document.getElementById("displayAs").selectedIndex = 1; - styleChanged(selectIndex); - } + } if(document.getElementById("formatUsing")) { if(_io.fieldType == "Bookmark") document.getElementById("formatUsing").selectedIndex = 1; var formatOption = (_io.primaryFieldType == "ReferenceMark" ? "referenceMarks" : "fields");