diff --git a/chrome/content/zotero/elements/splitMenuButton.js b/chrome/content/zotero/elements/splitMenuButton.js index 600bf9b613..a71a6f6064 100644 --- a/chrome/content/zotero/elements/splitMenuButton.js +++ b/chrome/content/zotero/elements/splitMenuButton.js @@ -58,6 +58,20 @@ connectedCallback() { this.append(this.contentFragment); + + // Prevent DOM-attached mouse handlers from running in the dropmarker area + for (const eventType of ['mousedown', 'mouseup', 'click']) { + const handler = this.getAttribute('on' + eventType); + if (!handler) { + continue; + } + this['on' + eventType] = null; + this.addEventListener(eventType, (event) => { + if (!this._isEventInDropmarkerBox(event)) { + eval(handler).bind(this); + } + }); + } } disconnectedCallback() {