fixed phantom last line
This commit is contained in:
parent
fd7a01c947
commit
c1478ec3c0
|
|
@ -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;
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue