[SHOPTIME-2052] 사방향키로 GNB 이동 후 매직마우스로 변경시 이동되면서 포커싱 되었던 메뉴가 selected됨

원인: 방향키 이동시 설정한 selection 이 남아있어서 문제임
대책: 마우스 이동시 사방향키의 selection 정보 제거
This commit is contained in:
yonghyon
2024-10-02 14:43:38 +09:00
parent 801e138296
commit bf42afd831

View File

@@ -696,6 +696,13 @@ export default function TabLayout({ topPanelName, onTabActivated, panelInfo }) {
} }
}, [secondDepthReduce, showSubTab, mainSelectedIndex]); }, [secondDepthReduce, showSubTab, mainSelectedIndex]);
//[SHOPTIME-2052] 사방향키로 GNB 이동 후 매직마우스로 변경시 이동되면서 포커싱 되었던 메뉴가 selected됨
useEffect(() => {
if (cursorVisible && !showSubTab) {
setMainSelectedIndex(-1);
}
}, [cursorVisible]);
const onMainMouseEnter = useCallback( const onMainMouseEnter = useCallback(
(ev) => { (ev) => {
mouseMainEntered.current = true; mouseMainEntered.current = true;