1
0
mirror of https://github.com/immich-app/immich.git synced 2025-02-07 18:50:19 +02:00

fix(web): prevent accidental modal closures on mouseup outside (#15900)

This commit is contained in:
André Ventura 2025-02-04 13:43:19 +00:00 committed by GitHub
parent 5015210f37
commit 97574d7296
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,12 +35,12 @@ export function clickOutside(node: HTMLElement, options: Options = {}): ActionRe
}
};
document.addEventListener('click', handleClick, true);
document.addEventListener('mousedown', handleClick, true);
node.addEventListener('keydown', handleKey, false);
return {
destroy() {
document.removeEventListener('click', handleClick, true);
document.removeEventListener('mousedown', handleClick, true);
node.removeEventListener('keydown', handleKey, false);
},
};