From a85d707226df44bd359f21dc2ce3224014c33b28 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 20 Apr 2019 03:28:47 -0400 Subject: [PATCH] Fix double progress meter in DB upgrade overlay --- chrome/content/zotero/xpcom/zotero.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index b3c058bbdc..440620db28 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -1429,8 +1429,12 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); //let progressMeter = win.ZoteroPane.document.getElementById('zotero-pane-progressmeter'); let doc = win.ZoteroPane.document; let container = doc.getElementById('zotero-pane-progressmeter-container'); - let progressMeter = doc.createElement('progressmeter'); - progressMeter.id = 'zotero-pane-progressmeter'; + let id = 'zotero-pane-progressmeter'; + let progressMeter = doc.getElementById(id); + if (!progressMeter) { + progressMeter = doc.createElement('progressmeter'); + progressMeter.id = id; + } progressMeter.setAttribute('mode', 'undetermined'); if (determinate) { progressMeter.mode = 'determined';