[PlayerPanel] sideContentsTimer add mouseover event

This commit is contained in:
고동영
2024-08-02 10:57:12 +09:00
parent ffd634859e
commit 39ebddf108

View File

@@ -886,7 +886,7 @@ const PlayerPanel = ({
setSideContentsVisible(false);
}, 10000);
const handleAction = () => {
const handleAction = (eventName) => {
clearTimeout(sideContentsTimer);
sideContentsTimer = setTimeout(() => {
setSideContentsVisible(false);
@@ -895,11 +895,13 @@ const PlayerPanel = ({
window.addEventListener("click", handleAction);
window.addEventListener("keydown", handleAction);
window.addEventListener("");
window.addEventListener("mouseover", handleAction);
return () => {
window.removeEventListener("click", handleAction);
window.removeEventListener("keydown", handleAction);
window.removeEventListener("mouseover", handleAction);
clearTimeout(sideContentsTimer);
};
}