From f7ff26347b18e693fd4d921d37e56335b967f4b0 Mon Sep 17 00:00:00 2001 From: optrader Date: Sat, 15 Nov 2025 15:33:58 +0900 Subject: [PATCH] [251115] fix: TScrollerDetail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ๐Ÿ• ์ปค๋ฐ‹ ์‹œ๊ฐ„: 2025. 11. 15. 15:33:58 ๐Ÿ“Š ๋ณ€๊ฒฝ ํ†ต๊ณ„: โ€ข ์ด ํŒŒ์ผ: 2๊ฐœ โ€ข ์ถ”๊ฐ€: +43์ค„ โ€ข ์‚ญ์ œ: -2์ค„ ๐Ÿ“ ์ˆ˜์ •๋œ ํŒŒ์ผ: ~ com.twin.app.shoptime/src/views/DetailPanel/components/TScroller/TScrollerDetail.jsx ~ com.twin.app.shoptime/src/views/DetailPanel/components/TScroller/TScrollerDetail.module.less ๐Ÿ”ง ํ•จ์ˆ˜ ๋ณ€๊ฒฝ ๋‚ด์šฉ: ๐Ÿ“„ com.twin.app.shoptime/src/views/DetailPanel/components/TScroller/TScrollerDetail.module.less (unknown): โœ… Added: child() ๐Ÿ”ง ์ฃผ์š” ๋ณ€๊ฒฝ ๋‚ด์šฉ: โ€ข UI ์ปดํฌ๋„ŒํŠธ ์•„ํ‚คํ…์ฒ˜ ๊ฐœ์„  --- .../components/TScroller/TScrollerDetail.jsx | 39 ++++++++++++++++++- .../TScroller/TScrollerDetail.module.less | 9 +++++ 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/com.twin.app.shoptime/src/views/DetailPanel/components/TScroller/TScrollerDetail.jsx b/com.twin.app.shoptime/src/views/DetailPanel/components/TScroller/TScrollerDetail.jsx index 25bd410f..f017a593 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/components/TScroller/TScrollerDetail.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/components/TScroller/TScrollerDetail.jsx @@ -4,12 +4,23 @@ import classNames from 'classnames'; import { useSelector } from 'react-redux'; import { off, on } from '@enact/core/dispatcher'; +import { is } from '@enact/core/keymap'; import { Job } from '@enact/core/util'; import Scroller from '@enact/sandstone/Scroller'; +import Spotlight from '@enact/spotlight'; +import SpotlightContainerDecorator from '@enact/spotlight/SpotlightContainerDecorator'; import AutoScrollAreaDetail, { POSITION } from '../AutoScrollAreaDetail/AutoScrollAreaDetail'; import css from './TScrollerDetail.module.less'; +const ScrollerContainer = SpotlightContainerDecorator( + { + enterTo: 'default-element', + restrict: 'self-only', + }, + 'div' +); + /** * DetailPanel ์ „์šฉ TScroller - ์ปค์Šคํ…€ ์Šคํฌ๋กค๋ฐ” ๊ตฌํ˜„ * onScroll* event can't use Callback dependency @@ -183,8 +194,31 @@ const TScrollerDetail = forwardRef( } }, [direction]); + // ์Šคํฌ๋กค๋ฐ”์— ํฌ์ปค์Šค๊ฐ€ ์žˆ์„ ๋•Œ arrow up/down์„ ์ฒ˜๋ฆฌํ•˜์—ฌ ํฌ์ปค์Šค ์œ ์ง€ + const handleScrollerKeyDown = useCallback( + (e) => { + const isUp = is('up')(e); + const isDown = is('down')(e); + + // arrow up/down์ผ ๋•Œ๋งŒ ์ฒ˜๋ฆฌ + if ((isUp || isDown) && direction === 'vertical') { + // ํ˜„์žฌ ํฌ์ปค์Šค๋œ ์š”์†Œ๊ฐ€ ์Šคํฌ๋กค๋ฐ”์ธ์ง€ ํ™•์ธ + const current = Spotlight.getCurrent(); + if (current && current.getAttribute('aria-label')?.includes('scroll')) { + // ์Šคํฌ๋กค๋ฐ”์— ํฌ์ปค์Šค๊ฐ€ ์žˆ์œผ๋ฉด ๊ธฐ๋ณธ ๋™์ž‘ ๋ฐฉ์ง€ํ•˜๊ณ  ํฌ์ปค์Šค ์œ ์ง€ + e.preventDefault(); + e.stopPropagation(); + } + } + }, + [direction] + ); + return ( -
+ @@ -224,7 +259,7 @@ const TScrollerDetail = forwardRef( cursorVisible={cursorVisible} /> ))} -
+ ); } ); diff --git a/com.twin.app.shoptime/src/views/DetailPanel/components/TScroller/TScrollerDetail.module.less b/com.twin.app.shoptime/src/views/DetailPanel/components/TScroller/TScrollerDetail.module.less index 1db73e82..daf9452c 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/components/TScroller/TScrollerDetail.module.less +++ b/com.twin.app.shoptime/src/views/DetailPanel/components/TScroller/TScrollerDetail.module.less @@ -80,6 +80,15 @@ } } } + + // ์Šคํฌ๋กค๋ฐ” thumb์˜ ํฌ์ปค์Šค ์ƒํƒœ + > div:nth-child(1) { + > div { + &:focus { + background-color: @PRIMARY_COLOR_RED !important; + } + } + } } &.preventScroll {