Fix cursor placement in chat composer placeholder

- Changed from flexbox to line-height for vertical centering
- Removed flex from .ProseMirror to fix cursor positioning
- Set line-height: 1.25rem to match min-height for proper alignment
- Removed flex items-center from EditorContent className

This ensures the cursor appears at the correct position when focusing
the input field, rather than after the placeholder text.
This commit is contained in:
Claude
2026-01-13 20:47:20 +00:00
parent 284837d7aa
commit 3c5d4e3a1a
2 changed files with 3 additions and 8 deletions

View File

@@ -888,10 +888,7 @@ export const MentionEditor = forwardRef<
<div <div
className={`rounded border bg-background transition-colors focus-within:border-primary h-7 flex items-center overflow-hidden px-2 ${className}`} className={`rounded border bg-background transition-colors focus-within:border-primary h-7 flex items-center overflow-hidden px-2 ${className}`}
> >
<EditorContent <EditorContent editor={editor} className="flex-1 min-w-0" />
editor={editor}
className="flex-1 min-w-0 flex items-center"
/>
</div> </div>
); );
}, },

View File

@@ -282,8 +282,7 @@ body.animating-layout
/* TipTap Editor Styles */ /* TipTap Editor Styles */
.ProseMirror { .ProseMirror {
min-height: 1.25rem; min-height: 1.25rem;
display: flex; line-height: 1.25rem;
align-items: center;
} }
.ProseMirror:focus { .ProseMirror:focus {
@@ -292,8 +291,7 @@ body.animating-layout
.ProseMirror p { .ProseMirror p {
margin: 0; margin: 0;
flex: 1; line-height: 1.25rem;
min-width: 0;
} }
.ProseMirror p.is-editor-empty:first-child::before { .ProseMirror p.is-editor-empty:first-child::before {