From b5ceb6fa650c91c7059fe69ecd32117044182725 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 29 Jul 2026 15:56:31 -0400 Subject: [PATCH] fx153: Don't assign oncommand attribute strings to .oncommand Bug 1974578 added oncommand to GlobalEventHandlers for the Invoker Commands API, so the assignment in _initImportedNodesPostInsert() -- an inert expando write until now -- started setting the WebIDL event handler, and [LegacyTreatNonObjectAsNull] turns a string into null. That wiped the handlers compiled when the pane fragment was imported, leaving every inline oncommand handler in the preferences panes dead. importNode() compiles the attribute handlers itself, so the loop can just be removed. --- chrome/content/zotero/preferences/preferences.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index b3956a21c7..985510fd5a 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -608,12 +608,6 @@ ${str} attributeFilter: ['preference'] }); - // parseXULToFragment() doesn't convert oncommand attributes into actual - // listeners, so we'll do it here - for (let elem of container.querySelectorAll('[oncommand]')) { - elem.oncommand = elem.getAttribute('oncommand'); - } - for (let child of container.children) { let event = new Event('load'); event.waitUntil = (promise) => {