Skip to content

Commit

Permalink
Fix mark toolbar button not applying mark properly (udecode#2231)
Browse files Browse the repository at this point in the history
  • Loading branch information
12joan authored Feb 27, 2023
1 parent 0c27cdb commit 75893f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/old-cougars-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@udecode/plate-ui-toolbar': patch
---

Fix mark toolbar button not applying mark properly
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export const MarkToolbarButton = <V extends Value>({
e.stopPropagation();

toggleMark(editor, { key: type!, clear });
setTimeout(() => {
focusEditor(editor, editor.selection ?? editor.prevSelection!);
}, 0);
focusEditor(editor);
}}
{...props}
/>
Expand Down

0 comments on commit 75893f4

Please sign in to comment.