mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-06-15 17:19:27 +02:00
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
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user