From c098f5e84da11e350d5538b6c8c43e5585180e79 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 21 Aug 2026 14:15:45 -0400 Subject: [PATCH] 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. --- chrome/content/zotero/xpcom/utilities_internal.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/utilities_internal.js b/chrome/content/zotero/xpcom/utilities_internal.js index 6b384cafaf..9a0822c7dc 100644 --- a/chrome/content/zotero/xpcom/utilities_internal.js +++ b/chrome/content/zotero/xpcom/utilities_internal.js @@ -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);