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.
This commit is contained in:
parent
5d6ad703c1
commit
dbc65faecb
1 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue