summaryrefslogtreecommitdiff
path: root/source/features/quick-repo-deletion.tsx
diff options
context:
space:
mode:
authorGravatar Florent <cheap.glitch@gmail.com> 2021-08-14 05:07:21 +0200
committerGravatar GitHub <noreply@github.com> 2021-08-14 10:07:21 +0700
commite962ab61fe5d058ac54ac9f0faea45bf31697c89 (patch)
treedf4426bd11547d5fb43ffebcd5edba0d8f629cb2 /source/features/quick-repo-deletion.tsx
parenta457488dfcfc3640e779073e629c3016bde3c03c (diff)
downloadrefined-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.tsx7
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});