summaryrefslogtreecommitdiffstatshomepage
path: root/frontend/src/lib/Actions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/lib/Actions.ts')
-rw-r--r--frontend/src/lib/Actions.ts22
1 files changed, 0 insertions, 22 deletions
diff --git a/frontend/src/lib/Actions.ts b/frontend/src/lib/Actions.ts
index 7231c2f..2c15b61 100644
--- a/frontend/src/lib/Actions.ts
+++ b/frontend/src/lib/Actions.ts
@@ -23,28 +23,6 @@ export function debounce(
};
}
-export function clickOutside(
- node: HTMLElement,
- { handler, ignore }: { handler: () => void; ignore?: HTMLElement }
-) {
- const handle = (event: Event) => {
- const target = event.target as HTMLElement;
- if (!target || target === ignore) return;
-
- if (node && !node.contains(target) && !event.defaultPrevented) {
- handler();
- }
- };
-
- document.addEventListener('click', handle, true);
-
- return {
- destroy() {
- document.removeEventListener('click', handle, true);
- }
- };
-}
-
export const focusableElements = [
'a[href]',
'area[href]',