From 6af0b01f231f44bb2b1e1ba0743326281670c138 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Sat, 30 Aug 2025 12:56:24 +0000 Subject: [PATCH] Stop automatic scrolling when moving the mouse away from the category Adds a check to clear the existing scroll interval before starting a new one in the `startAutoScroll` function within the `CategoryRow` component. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 074b0e4c-6171-43bd-aa98-f9e04623ca14 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/074b0e4c-6171-43bd-aa98-f9e04623ca14/6upLu3q --- client/src/components/netflix-grid.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx index 581101c..31e2035 100644 --- a/client/src/components/netflix-grid.tsx +++ b/client/src/components/netflix-grid.tsx @@ -155,6 +155,11 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { }; const startAutoScroll = (direction: 'left' | 'right') => { + // Stop any existing scrolling first + if (scrollIntervalRef.current) { + clearInterval(scrollIntervalRef.current); + } + setIsScrolling(true); scrollIntervalRef.current = setInterval(() => { if (scrollRef.current) {