[PlayerPanel] sideContentsTimer add mouseover event
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user