fix(workspace): keep a bullet's height when clicking into it

The focused textarea was inline-block and left room for descenders below
it, so the row grew by 6 px and everything below shifted on every click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sandrodachandClaude Opus 5.5 committed 2026-11-02 10:40:17 +01:00
1 parent 8e3fa51d90
commit 0f17cc3c33
1 file changed
+3 -1
@@ -1437,6 +1437,8 @@ export const OutlinerBlock: React.FC<OutlinerBlockProps> = ({
)} )}
</div> </div>
{/* Display block: inline, the focused field would sit on a text baseline and leave a gap below
it, so the row grew by a few pixels on every click */}
<textarea <textarea
ref={(el) => { ref={(el) => {
textareaRef.current = el; textareaRef.current = el;
@@ -1482,7 +1484,7 @@ export const OutlinerBlock: React.FC<OutlinerBlockProps> = ({
} }
} }
}} }}
className={`w-full min-h-[1.5rem] resize-none overflow-hidden bg-transparent border-0 focus:outline-none focus:ring-0 leading-relaxed whitespace-pre-wrap break-words [overflow-wrap:anywhere] ${ className={`block w-full min-h-[1.5rem] resize-none overflow-hidden bg-transparent border-0 focus:outline-none focus:ring-0 leading-relaxed whitespace-pre-wrap break-words [overflow-wrap:anywhere] ${
activeFocus ? 'relative z-0 text-main' : 'absolute inset-0 text-transparent selection:text-transparent pointer-events-none' activeFocus ? 'relative z-0 text-main' : 'absolute inset-0 text-transparent selection:text-transparent pointer-events-none'
} ${ } ${
block.type === 'h1' block.type === 'h1'