From c1478ec3c0a8d84640f26db5a59948b37f3c97fe Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Sun, 14 Dec 2025 12:19:49 +0100 Subject: [PATCH] fixed phantom last line --- frontend/app.js | 4 ++++ frontend/index.html | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/frontend/app.js b/frontend/app.js index 72f58a3..a516818 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -683,6 +683,10 @@ function noteApp() { // Restore protected code blocks html = html.replace(/\x00CODE(\d+)\x00/g, (match, index) => codePlaceholders[parseInt(index)]); + // Add trailing space to match textarea's phantom line for cursor + // This ensures the overlay and textarea have the same content height + html += '\n '; + return html; }, diff --git a/frontend/index.html b/frontend/index.html index deaca20..e523e95 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -453,6 +453,7 @@ background-color: var(--bg-primary) !important; color: var(--text-primary) !important; resize: none; + overflow: auto; } /* Syntax Highlighting Overlay */ @@ -477,10 +478,16 @@ position: absolute; inset: 0; pointer-events: none; - overflow: hidden; + overflow: auto; color: var(--text-primary); background-color: var(--bg-primary); z-index: 0; + /* Hide scrollbars but allow programmatic scrolling */ + scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* IE/Edge */ + } + .syntax-overlay::-webkit-scrollbar { + display: none; /* Chrome/Safari */ } /* Zen Mode Styles */