(Component: React.Co },[scrubberWidth, boundingWidth]); useLayoutEffect(() => { - if(!(window as any)[`${key}listenders`]){ - (window as any)[`${key}listenders`] = true; + if(!(window as any)[`listener-id-${key}`]){ + (window as any)[`listender-id-${key}`] = true; window.addEventListener("mousedown", handleScrubStart); window.addEventListener("mouseup", handleScrubEnd); window.addEventListener("mousemove", handleScrubMove); return () => { - (window as any)[`${key}listenders`] = false; + (window as any)[`${key}listeners`] = false; window.removeEventListener("mousedown", handleScrubStart); window.removeEventListener("mouseup", handleScrubEnd); window.removeEventListener("mousemove", handleScrubMove); }; } - }, [handleScrubEnd, handleScrubMove, key]); + }, [handleScrubStart, handleScrubEnd, handleScrubMove, key]); return(