From 228900100695aae325ce000057e0fedbcc184dc9 Mon Sep 17 00:00:00 2001 From: "junghoon86.park" Date: Wed, 26 Nov 2025 20:39:21 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=83=81=ED=92=88=20=EC=83=81=EC=84=B8]=20?= =?UTF-8?q?=EC=9E=A5=EB=B0=94=EA=B5=AC=EB=8B=88=20=EB=8B=B4=EC=9D=84?= =?UTF-8?q?=EB=95=8C=20=ED=8C=9D=EC=97=85=20=EB=85=B8=EC=B6=9C=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 장바구니 담을때 토스트 블러로 인하여 자동으로 닫히는부분 에 대한 수정 - 매직마우스는 상관이없지만 4방향키에서 문제가 있어 이부분에 대한 수정. --- .../src/components/TToast/TToastEnhanced.jsx | 18 ++++++++++++------ .../ProductAllSection/ProductAllSection.jsx | 14 ++++++++++++-- .../views/DetailPanel/components/BuyOption.jsx | 3 ++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/com.twin.app.shoptime/src/components/TToast/TToastEnhanced.jsx b/com.twin.app.shoptime/src/components/TToast/TToastEnhanced.jsx index b92a2288..373703ac 100644 --- a/com.twin.app.shoptime/src/components/TToast/TToastEnhanced.jsx +++ b/com.twin.app.shoptime/src/components/TToast/TToastEnhanced.jsx @@ -58,14 +58,18 @@ export default function TToastEnhanced({ const timerRef = useRef(null); const progressRef = useRef(null); const cursorVisible = useSelector((state) => state.common.appStatus.cursorVisible); + const { popupVisible } = useSelector((state) => state.common.popup); // BuyOption 포커스 이탈 감지 핸들러 - const handleBuyOptionBlur = (e) => { - // 포커스가 BuyOption 컴포넌트 외부로 이동했는지 확인 - if (!e.currentTarget.contains(e.relatedTarget) && !cursorVisible) { + const handleBuyOptionBlur = (e) => { + // 포커스가 BuyOption 컴포넌트 외부로 이동했는지 확인 + if(popupVisible){ + return; + } + if (!e.currentTarget.contains(e.relatedTarget)) { console.log('[TToastEnhanced] Focus left BuyOption - closing toast'); handleClose(); - } + } }; // 애니메이션 시작 @@ -123,7 +127,9 @@ export default function TToastEnhanced({ console.log( `[TToastEnhanced] Focus left ${type} after receiving focus - closing toast` ); - handleClose(); + if(type !== "buyOption"){ + handleClose(); + } } } }; @@ -212,7 +218,7 @@ export default function TToastEnhanced({ {...rest} > {type === 'buyOption' ? ( -
+
state.coupon.productCouponSearchData); const { userNumber } = useSelector((state) => state.common.appStatus.loginUserData); const { popupVisible, activePopup } = useSelector((state) => state.common.popup); + const cursorVisible = useSelector((state) => state.common.appStatus.cursorVisible); // ProductVideo 버전 관리 (1: 기존 modal 방식, 2: 내장 방식 , 3: 비디오 생략) const [productVideoVersion, setProductVideoVersion] = useState(1); // 비디오 재생 여부 flag (재생 전에는 minimize/restore 로직 비활성화) @@ -877,7 +878,7 @@ export default function ProductAllSection({ ); //닫히도록 - const handleCloseToast = useCallback(() => { + const handleCloseToast = useCallback((e) => { // 팝업이 열려있으면 닫지 않음 if (popupVisible) { return; // 팝업이 활성이면 무시 @@ -886,6 +887,15 @@ export default function ProductAllSection({ setOpenToast(false); }, [dispatch, popupVisible]); + const handleFocus = useCallback((e)=>{ + // 팝업이 열려있으면 닫지 않음 + if (popupVisible && cursorVisible) { + return; // 팝업이 활성이면 무시 + } + dispatch(clearAllToasts()); + setOpenToast(false); + },[dispatch, popupVisible, cursorVisible]) + // 스크롤 컨테이너의 클릭 이벤트 추적용 로깅 const handleScrollContainerClick = useCallback((e) => { // console.log('📱 [ProductAllSection] TScrollerDetail onClick 감지됨', { @@ -1493,7 +1503,7 @@ export default function ProductAllSection({ } return ( - + {/* Left Margin Section - 60px */}
diff --git a/com.twin.app.shoptime/src/views/DetailPanel/components/BuyOption.jsx b/com.twin.app.shoptime/src/views/DetailPanel/components/BuyOption.jsx index 9c8a163a..595b40f7 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/components/BuyOption.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/components/BuyOption.jsx @@ -1247,7 +1247,7 @@ const BuyOption = ({ }) ); } - dispatch(clearAllToasts()); + // dispatch(clearAllToasts()); }, [ dispatch, userNumber, @@ -1458,6 +1458,7 @@ const BuyOption = ({ const handleCartMove = useCallback(() => { dispatch(setHidePopup()); + clearAllToasts(); dispatch( pushPanel({ name: Config.panel_names.CART_PANEL,