Skip to content

Commit

Permalink
fix editor exit button appears on room switch
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbura committed Feb 14, 2025
1 parent 09d85d6 commit 9519d2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/components/editor/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 9519d2f

Please sign in to comment.