fixed phantom last line

This commit is contained in:
Gamosoft 2025-12-14 12:19:49 +01:00
parent fd7a01c947
commit c1478ec3c0
2 changed files with 12 additions and 1 deletions

View File

@ -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;
},

View File

@ -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 */