mirror of
https://github.com/wgh136/nysoure.git
synced 2025-12-16 07:51:14 +00:00
feat: add touch event listener for mouse move handling in GalleryFullscreen
This commit is contained in:
@@ -240,10 +240,12 @@ function GalleryFullscreen({
|
|||||||
|
|
||||||
if (dialogRef.current?.open) {
|
if (dialogRef.current?.open) {
|
||||||
window.addEventListener("mousemove", handleMouseMove);
|
window.addEventListener("mousemove", handleMouseMove);
|
||||||
|
window.addEventListener("touchstart", handleMouseMove);
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener("mousemove", handleMouseMove);
|
window.removeEventListener("mousemove", handleMouseMove);
|
||||||
|
window.removeEventListener("touchstart", handleMouseMove);
|
||||||
if (hideTimeoutRef.current) {
|
if (hideTimeoutRef.current) {
|
||||||
clearTimeout(hideTimeoutRef.current);
|
clearTimeout(hideTimeoutRef.current);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user