From 5794d8a9542c48b7ad1e7c17e1fd1b9dc83568c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Thu, 12 Jun 2025 14:28:08 +0300 Subject: [PATCH] Restore split menu button fix (d96afa44, regression b2ad17d6) --- chrome/content/zotero/elements/splitMenuButton.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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() {