fix editor exit button appears on room switch ()

This commit is contained in:
Ajay Bura 2025-02-15 18:58:02 +11:00 committed by GitHub
parent 09d85d6c31
commit 2ed3f877c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -257,7 +257,9 @@ export function Toolbar() {
const modKey = isMacOS() ? KeySymbol.Command : 'Ctrl';
const disableInline = isBlockActive(editor, BlockType.CodeBlock);
const canEscape = isAnyMarkActive(editor) || !isBlockActive(editor, BlockType.Paragraph);
const canEscape = isBlockActive(editor, BlockType.Paragraph)
? isAnyMarkActive(editor)
: ReactEditor.isFocused(editor);
const [isMarkdown, setIsMarkdown] = useSetting(settingsAtom, 'isMarkdown');
return (