mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-27 08:48:46 +00:00
Re-add context menu
This commit is contained in:
@@ -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])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user