diff --git a/chrome/content/zotero/customElements.js b/chrome/content/zotero/customElements.js index 3d64b0aa50..cab62b5010 100644 --- a/chrome/content/zotero/customElements.js +++ b/chrome/content/zotero/customElements.js @@ -127,6 +127,12 @@ Services.scriptloader.loadSubScript('chrome://zotero/content/elements/itemTreeMe // This is the event we want to work with, since we do not expect events with .sourceEvent // and has no menupopup ancestor. if (originalTarget.localName === "command" && event.sourceEvent?.type === "command") { + // Don't touch commands handled internally, like cmd_undo and other Edit menu commands, + // because delaying the event would break them + if (originalTarget.getAttribute("internal") === "true") { + return; + } + event = event.sourceEvent; originalTarget = event.target; }