mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-04 13:59:09 +00:00
fix: hide fade out elements by default
This commit is contained in:
committed by
Alex Christoffer Rasmussen
parent
adebde1b43
commit
6ff06b21a8
@@ -23,6 +23,9 @@ export const useFadeOutOnInactivity = (initialState = false) => {
|
|||||||
|
|
||||||
const throttledShowMenu = throttle(setShowMenuTrue, 1000);
|
const throttledShowMenu = throttle(setShowMenuTrue, 1000);
|
||||||
|
|
||||||
|
// we call the function on mount, to make sure the menu is hidden
|
||||||
|
throttledShowMenu();
|
||||||
|
|
||||||
document.addEventListener('mousemove', throttledShowMenu);
|
document.addEventListener('mousemove', throttledShowMenu);
|
||||||
document.addEventListener('keydown', throttledShowMenu);
|
document.addEventListener('keydown', throttledShowMenu);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user