From 0bbe064245f040fa9b905a7eaef4be9f67ebaf4a Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 25 Aug 2021 02:25:31 -0400 Subject: [PATCH] Don't toggle libraries-to-sync row on Enter Otherwise if you close the dialog with Enter the current row (which is probably the row you just changed) is toggled Regression from HTMLification --- chrome/content/zotero/preferences/preferences_sync.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/preferences/preferences_sync.jsx b/chrome/content/zotero/preferences/preferences_sync.jsx index 661da846fd..456ac5d2c7 100644 --- a/chrome/content/zotero/preferences/preferences_sync.jsx +++ b/chrome/content/zotero/preferences/preferences_sync.jsx @@ -280,6 +280,9 @@ Zotero_Preferences.Sync = { else { div = document.createElementNS("http://www.w3.org/1999/xhtml", 'div'); div.className = "row"; + div.addEventListener('dblclick', () => { + this.toggleLibraryToSync(index); + }); } div.classList.toggle('selected', selection.isSelected(index)); @@ -320,7 +323,6 @@ Zotero_Preferences.Sync = { columns={columns} staticColumns={true} disableFontSizeScaling={true} - onActivate={Zotero_Preferences.Sync.toggleLibraryToSync.bind(this)} onKeyDown={handleKeyDown} />