Tags box: Disable Remove All Tags when not editable

This commit is contained in:
Abe Jellinek 2025-04-15 14:25:14 -05:00 committed by Dan Stillman
parent 427e8daaf9
commit bd451196b0

View file

@ -60,7 +60,7 @@
let removeAllItemTags = this._id('remove-all-item-tags');
this._id('remove-all-item-tags').addEventListener('command', this.removeAll);
this.querySelector('.body').addEventListener('contextmenu', (event) => {
removeAllItemTags.disabled = !this.count;
removeAllItemTags.disabled = !this.editable || !this.count;
this._id('tags-context-menu').openPopupAtScreen(event.screenX, event.screenY, true);
});
// Register our observer with priority 101 (after Zotero.Tags) so we get updated tag colors