From 30a81a7d544211fb5f50a9e247a8513c257dc91a Mon Sep 17 00:00:00 2001 From: Jazza Date: Mon, 23 Oct 2023 02:50:29 +0800 Subject: [PATCH] Forgot to change the other one lmao --- addons/onion-skinning/userscript.js | 4 +--- addons/paint-snap/ui.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/onion-skinning/userscript.js b/addons/onion-skinning/userscript.js index 21b50efc55..12bf1e42a9 100644 --- a/addons/onion-skinning/userscript.js +++ b/addons/onion-skinning/userscript.js @@ -585,9 +585,7 @@ export default async function ({ addon, console, msg }) { settingButton.appendChild(createButtonImage("settings")); document.body.addEventListener("click", (e) => { - if (areSettingsOpen() && !e.target.matches("[class*=sa-onion-]")) { - setSettingsOpen(false); - } + if (areSettingsOpen() && !e.target.matches("[class*=sa-onion-]")) setSettingsOpen(false); }); // diff --git a/addons/paint-snap/ui.js b/addons/paint-snap/ui.js index a219ef31ce..f74bbafbd6 100644 --- a/addons/paint-snap/ui.js +++ b/addons/paint-snap/ui.js @@ -78,7 +78,7 @@ export function initUI({ addon, msg }) { controlsGroup.appendChild(settingButton); document.body.addEventListener("click", (e) => { - if (!e.target.matches("[class*=sa-paint-snap-]") && areSettingsOpen()) setSettingsOpen(false); + if (areSettingsOpen() && !e.target.matches("[class*=sa-paint-snap-]")) setSettingsOpen(false); }); const settingsOpenUpdaters = [];