- 수기발행,1:1문의 등록, 빌링 모바일 용 패딩 추가 로직 추가

This commit is contained in:
HyeonJongKim
2025-11-07 11:09:35 +09:00
parent da66206417
commit 21103232e9
5 changed files with 143 additions and 116 deletions

View File

@@ -18,7 +18,7 @@ export const useKeyboardAware = (options?: UseKeyboardAwareOptions) => {
const [keyboardHeight, setKeyboardHeight] = useState<number>(0);
useEffect(() => {
let focusedElement: HTMLInputElement | null = null;
let focusedElement: HTMLElement | null = null;
let isKeyboardOpen = false;
// 네이티브에서 호출할 전역 함수 등록
@@ -44,7 +44,7 @@ export const useKeyboardAware = (options?: UseKeyboardAwareOptions) => {
};
// focus된 요소를 추적하기 위한 함수
(window as any).setFocusedElement = (element: HTMLInputElement) => {
(window as any).setFocusedElement = (element: HTMLElement) => {
focusedElement = element;
// 키보드가 이미 열려있으면 즉시 스크롤
@@ -62,8 +62,8 @@ export const useKeyboardAware = (options?: UseKeyboardAwareOptions) => {
};
}, []);
// 모든 input에서 사용할 공통 핸들러
const handleInputFocus = (e: React.FocusEvent<HTMLInputElement>) => {
// input과 textarea 모두에서 사용할 공통 핸들러
const handleInputFocus = (e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => {
// focus된 요소를 저장
(window as any).setFocusedElement?.(e.target);
};