fix: apply the selection highlight only when the editor is unfocused and keep it out of the chat input (#29952)

This commit is contained in:
G30 2026-09-12 17:19:09 -04:00 committed by GitHub
parent 0edd731c74
commit 887372aca5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -724,9 +724,9 @@
props: {
decorations: (state) => {
const { selection } = state;
const { focused } = this.editor;
const { isFocused } = this.editor;
if (focused || selection.empty) {
if (isFocused || selection.empty) {
return null;
}
@ -830,7 +830,7 @@
...(messageInput ? [PromptItalic] : []),
...(dragHandle ? [ListItemDragHandle] : []),
Placeholder.configure({ placeholder: () => _placeholder, showOnlyWhenEditable: false }),
SelectionDecoration,
...(messageInput ? [] : [SelectionDecoration]),
...(richText
? [