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.
This commit is contained in:
Simon Kornblith 2013-04-18 03:29:20 -04:00
parent b8ce002df3
commit ecb8cb140d

View File

@ -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");