From 9ed550c882b83729883999c42e41b9c470de80dd Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 6 Mar 2022 03:02:41 +0300 Subject: [PATCH] fix popup find error --- popup/popup.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/popup/popup.js b/popup/popup.js index e22049ee..6f28b39c 100644 --- a/popup/popup.js +++ b/popup/popup.js @@ -92,9 +92,10 @@ async function initPopup(frames) { const elFind = $('#find-styles-btn'); elFind.onclick = async e => { - elFind.disabled = e.type === 'click'; + const inline = e.type === 'click'; + if (inline) elFind.disabled = true; await require(['/popup/search']); - Events.searchSite(e); + if (!inline) Events.searchSite(e); }; elFind.on('split-btn', elFind.onclick);