From dbc65faecbc23361eebafbc251318921c56d0bc6 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 2 Sep 2022 11:22:50 -0400 Subject: [PATCH] Preferences: Don't add IDs to pane containers Built-in panes were creating a semi-invalid DOM in which the pane container and the root element of the pane's XHTML got the same ID. There's no reason to give containers IDs in the DOM, since we already have a Map of IDs to pane objects, so let's just not. --- chrome/content/zotero/preferences/preferences.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index 72fab3bde8..2247b266cb 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -88,7 +88,7 @@ var Zotero_Preferences = { if (io.pane) { let tabID = io.tab; let tabIndex = io.tabIndex; - var pane = document.getElementById(io.pane); + var pane = this.panes.get(io.pane); this.navigation.value = io.pane; // Select tab within pane by tab id if (tabID !== undefined) { @@ -99,7 +99,7 @@ var Zotero_Preferences = { } // Select tab within pane by index else if (tabIndex !== undefined) { - let tabBox = pane.querySelector('tabbox'); + let tabBox = pane.container.querySelector('tabbox'); if (tabBox) { tabBox.selectedIndex = tabIndex; } @@ -233,7 +233,6 @@ var Zotero_Preferences = { this.navigation.append(listItem); let container = document.createXULElement('vbox'); - container.id = id; container.hidden = true; this.content.append(container);