diff options
author | 2021-08-14 05:07:21 +0200 | |
---|---|---|
committer | 2021-08-14 10:07:21 +0700 | |
commit | e962ab61fe5d058ac54ac9f0faea45bf31697c89 (patch) | |
tree | df4426bd11547d5fb43ffebcd5edba0d8f629cb2 /source/features/quick-repo-deletion.tsx | |
parent | a457488dfcfc3640e779073e629c3016bde3c03c (diff) | |
download | refined-github-e962ab61fe5d058ac54ac9f0faea45bf31697c89.tar.gz refined-github-e962ab61fe5d058ac54ac9f0faea45bf31697c89.tar.zst refined-github-e962ab61fe5d058ac54ac9f0faea45bf31697c89.zip |
Fix `quick-repo-deletion` not aborting on Firefox (#4651)
Diffstat (limited to 'source/features/quick-repo-deletion.tsx')
-rw-r--r-- | source/features/quick-repo-deletion.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/features/quick-repo-deletion.tsx b/source/features/quick-repo-deletion.tsx index 1372f121..23100c7a 100644 --- a/source/features/quick-repo-deletion.tsx +++ b/source/features/quick-repo-deletion.tsx @@ -56,10 +56,11 @@ async function verifyScopesWhileWaiting(abortController: AbortController): Promi } async function buttonTimeout(buttonContainer: HTMLDetailsElement): Promise<boolean> { - // Sync AbortController and DOM state const abortController = new AbortController(); - buttonContainer.addEventListener('toggle', abortController.abort, {once: true}); - abortController.signal.addEventListener('abort', () => { + // Add a global click listener to avoid potential future issues with z-index + document.addEventListener('click', event => { + event.preventDefault(); + abortController.abort(); buttonContainer.open = false; }, {once: true}); |