From df9d8d593c5a3be5735284c05b702cd849b44f84 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 7 Sep 2022 11:15:36 -0400 Subject: [PATCH] fx-compat: Fix sync button tooltip XULTooltipElement now prepends a node, so the nodes we were getting were off by one. Just use class names for all the children. --- chrome/content/zotero/xpcom/sync/syncRunner.js | 6 +++--- chrome/content/zotero/zoteroPane.xhtml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/xpcom/sync/syncRunner.js b/chrome/content/zotero/xpcom/sync/syncRunner.js index 435cc7dc2c..4aa79f6a9c 100644 --- a/chrome/content/zotero/xpcom/sync/syncRunner.js +++ b/chrome/content/zotero/xpcom/sync/syncRunner.js @@ -1601,12 +1601,12 @@ Zotero.Sync.Runner_Module = function (options = {}) { * * If no label passed, unregister current label * - * @param {Tooltip} [tooltip] + * @param {π} [tooltip] */ this.registerSyncStatus = function (tooltip) { if (tooltip) { - _currentSyncStatusLabel = tooltip.firstChild.nextSibling; - _currentLastSyncLabel = tooltip.firstChild.nextSibling.nextSibling; + _currentSyncStatusLabel = tooltip.querySelector('.sync-button-tooltip-status'); + _currentLastSyncLabel = tooltip.querySelector('.sync-button-tooltip-last-sync'); _currentTooltipMessages = tooltip.querySelector('.sync-button-tooltip-messages'); } else { diff --git a/chrome/content/zotero/zoteroPane.xhtml b/chrome/content/zotero/zoteroPane.xhtml index 5f50698a98..7c4977db7b 100644 --- a/chrome/content/zotero/zoteroPane.xhtml +++ b/chrome/content/zotero/zoteroPane.xhtml @@ -848,8 +848,8 @@ onpopuphiding="Zotero.Sync.Runner.registerSyncStatus()" noautohide="true">