commit ecb8cb140d16651440a3a14fc952051d501c9145
parent b8ce002df3d328621b2ff15ecdfc24b6528ebe09
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 18 Apr 2013 03:29:20 -0400
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.
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git 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");