From 3db7c4e24e1f57d97da98c52bbb3ab1bed74791b Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 13 Jan 2026 19:35:39 +0000 Subject: [PATCH] Fix chat composer placeholder and text placement - Reduced ProseMirror min-height from 2rem to 1.25rem to match container height - Added consistent line-height of 1.25rem for proper vertical alignment - Removed float: left from placeholder pseudo-element (incompatible with flexbox) - Removed whitespace-nowrap from editor to allow proper text wrapping Fixes issue where placeholder and text were misaligned in chat composer --- src/components/editor/MentionEditor.tsx | 2 +- src/index.css | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/editor/MentionEditor.tsx b/src/components/editor/MentionEditor.tsx index d301565..bf09a10 100644 --- a/src/components/editor/MentionEditor.tsx +++ b/src/components/editor/MentionEditor.tsx @@ -809,7 +809,7 @@ export const MentionEditor = forwardRef< editorProps: { attributes: { class: - "prose prose-sm max-w-none focus:outline-none min-h-[1.25rem] px-2 py-1 whitespace-nowrap text-sm", + "prose prose-sm max-w-none focus:outline-none min-h-[1.25rem] px-2 py-1 text-sm", }, }, autofocus: autoFocus, diff --git a/src/index.css b/src/index.css index 9684d61..023cd8e 100644 --- a/src/index.css +++ b/src/index.css @@ -281,7 +281,8 @@ body.animating-layout /* TipTap Editor Styles */ .ProseMirror { - min-height: 2rem; + min-height: 1.25rem; + line-height: 1.25rem; } .ProseMirror:focus { @@ -290,11 +291,11 @@ body.animating-layout .ProseMirror p { margin: 0; + line-height: 1.25rem; } .ProseMirror p.is-editor-empty:first-child::before { content: attr(data-placeholder); - float: left; color: hsl(var(--muted-foreground)); pointer-events: none; height: 0;