mirror of
https://github.com/zotero/zotero.git
synced 2026-10-06 02:50:03 +00:00
Show the icon on the checked item in a collection menu on macOS
On macOS, the current target in the New Collection dialog and the Add To menus showed a checkmark in place of its folder icon -- type="checkbox" makes nsMenuItemX::SetupIcon() skip the item. The `checked` attribute alone marks it without suppressing the icon. Windows and Linux draw the check in place of the icon either way.
This commit is contained in:
parent
1d1d32a211
commit
c098f5e84d
1 changed files with 1 additions and 2 deletions
|
|
@ -1790,8 +1790,7 @@ Zotero.Utilities.Internal = {
|
|||
let menuitem = doc.createXULElement('menuitem');
|
||||
menuitem.setAttribute("label", label);
|
||||
if (value == currentTarget) {
|
||||
// type="checkbox" hides icon, so only set if checked
|
||||
menuitem.setAttribute("type", "checkbox");
|
||||
// Not type="checkbox", which suppresses the icon
|
||||
menuitem.setAttribute("checked", "true");
|
||||
}
|
||||
menuitem.setAttribute("value", value);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue