Skip to content

Commit 484d7da

Browse files
committed
fix: do not return focus back to menu
Took me forever to debug, but this was breaking the ability to:\ - make a text selection - add a text color to it through the formatting toolbar - arrow-left to collapse the selection & hide the formatting toolbar It seems that [mantine chose to add a default of `returnFocus` to mantine menus](mantinedev/mantine@226d251), meaning when they close, that the focus would be moved back to the menu This broke us wanting to move the selection back to the editor, it was instead being trapped by the menu and unable to move back to the editor
1 parent ce995ee commit 484d7da

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/mantine/src/menu/Menu.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const Menu = (props: ComponentProps["Generic"]["Menu"]["Root"]) => {
4040
middlewares={{ flip: true, shift: true, inline: false, size: true }}
4141
onChange={onOpenChange}
4242
position={position}
43+
returnFocus={false}
4344
>
4445
{children}
4546
</MantineMenu>

0 commit comments

Comments
 (0)