@@ -33,6 +33,7 @@ export function WritePanel({
3333
3434 const handleKeyDown = ( e : React . KeyboardEvent < HTMLTextAreaElement > ) => {
3535 if ( e . key !== 'Enter' ) return ;
36+ if ( e . nativeEvent . isComposing ) return ;
3637
3738 const textarea = textareaRef . current ! ;
3839 const { value, selectionStart, selectionEnd } = textarea ;
@@ -59,17 +60,24 @@ export function WritePanel({
5960
6061 if ( isEmptyItem ) {
6162 // 빈 항목에서 Enter → 리스트 종료, 접두사 제거
62- newValue = value . substring ( 0 , lineStart ) + value . substring ( selectionStart ) ;
63+ newValue =
64+ value . substring ( 0 , lineStart ) + value . substring ( selectionStart ) ;
6365 newCursor = lineStart ;
6466 } else if ( unorderedMatch ) {
6567 const [ , indent , bullet ] = unorderedMatch ;
6668 const insertion = `\n${ indent } ${ bullet } ` ;
67- newValue = value . substring ( 0 , selectionStart ) + insertion + value . substring ( selectionEnd ) ;
69+ newValue =
70+ value . substring ( 0 , selectionStart ) +
71+ insertion +
72+ value . substring ( selectionEnd ) ;
6873 newCursor = selectionStart + insertion . length ;
6974 } else {
7075 const [ , indent , numStr ] = orderedMatch ! ;
7176 const insertion = `\n${ indent } ${ parseInt ( numStr ) + 1 } . ` ;
72- newValue = value . substring ( 0 , selectionStart ) + insertion + value . substring ( selectionEnd ) ;
77+ newValue =
78+ value . substring ( 0 , selectionStart ) +
79+ insertion +
80+ value . substring ( selectionEnd ) ;
7381 newCursor = selectionStart + insertion . length ;
7482 }
7583
@@ -83,7 +91,7 @@ export function WritePanel({
8391 } ;
8492
8593 return (
86- < section className = "flex-1 flex flex-col gap-4 pt-4 min-w-0 " >
94+ < section className = "flex-1 flex flex-col gap-4 pt-4 min-w-[300px] " >
8795 < h2 className = "text-[25px] font-semibold text-main2" >
8896 { currentStep . title }
8997 </ h2 >
0 commit comments