Re-add context menu

This commit is contained in:
Misode
2021-09-10 00:46:34 +02:00
parent e3fb5923c0
commit a685cfeb1b
2 changed files with 21 additions and 1 deletions

View File

@@ -10,9 +10,11 @@ export function useFocus(): [boolean, () => unknown] {
useEffect(() => {
if (active) {
document.body.addEventListener('click', hider)
document.body.addEventListener('contextmenu', hider)
}
return () => {
document.body.removeEventListener('click', hider)
document.body.removeEventListener('contextmenu', hider)
}
}, [active])