From d6756010b115f4303186ba4a9d22a5fe08ffac8e Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Tue, 14 Apr 2026 15:46:37 +0900 Subject: [PATCH] =?UTF-8?q?fix(memos):=20=EB=A7=88=EA=B0=90=EC=9D=BC=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EC=A4=84=EB=B0=94=EA=BF=88=20=EC=97=86?= =?UTF-8?q?=EC=9D=B4=20=EC=BB=A4=EC=84=9C=20=EC=98=86=EC=97=90=20=EC=82=BD?= =?UTF-8?q?=EC=9E=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit insertAtCursor가 자동 줄바꿈 추가해서 마감일이 아랫줄에 생성됨. 직접 삽입으로 변경하여 현재 커서 위치 바로 옆에 @날짜 삽입. Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/routes/memos/+page.svelte | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/routes/memos/+page.svelte b/frontend/src/routes/memos/+page.svelte index b3d76a2..e807f3e 100644 --- a/frontend/src/routes/memos/+page.svelte +++ b/frontend/src/routes/memos/+page.svelte @@ -125,7 +125,16 @@ function addDueDate() { const ta = document.querySelector('[data-memo-input]'); - insertAtCursor(ta, ` @${todayIso()}`); + if (!ta) return; + const start = ta.selectionStart; + const end = ta.selectionEnd; + const ins = ` @${todayIso()}`; + newContent = newContent.slice(0, start) + ins + newContent.slice(end); + requestAnimationFrame(() => { + const pos = start + ins.length; + ta.focus(); + ta.setSelectionRange(pos, pos); + }); } // 편집 모드 툴바