Fix library menu type attribute

A follow up fix after #4052
Fix the padding of library menu on MacOS
This commit is contained in:
windingwind 2024-05-01 11:44:00 +08:00
parent 638efad3eb
commit 63012a816f
2 changed files with 2 additions and 1 deletions

View file

@ -554,10 +554,10 @@
for (let row of rows) {
let menuitem = valueMenu.appendItem(row.name, row.value);
menuitem.setAttribute('type', 'radio');
if (row.image) {
menuitem.className = 'menuitem-iconic';
menuitem.setAttribute('image', row.image);
menuitem.setAttribute('type', 'radio');
}
}
valueMenu.selectedIndex = 0;

View file

@ -1548,6 +1548,7 @@ Zotero.Utilities.Internal = {
let menuitem = menulist.ownerDocument.createXULElement('menuitem');
menuitem.value = library.libraryID;
menuitem.setAttribute('label', library.name);
menuitem.setAttribute('type', 'radio');
menuitem.setAttribute('data-editable', library.editable ? 'true' : 'false');
menuitem.setAttribute('data-filesEditable', library.filesEditable ? 'true' : 'false');
menupopup.appendChild(menuitem);