Skip to content

Commit

Permalink
Fix floating link insert popup closing other editors popups
Browse files Browse the repository at this point in the history
  • Loading branch information
O4epegb committed Nov 7, 2022
1 parent dd5bf12 commit 310804e
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,17 @@ export const useFloatingLinkInsert = ({
[focused]
);

const ref = useOnClickOutside(() => {
if (floatingLinkSelectors.mode() === 'insert') {
floatingLinkActions.hide();
focusEditor(editor, editor.selection!);
const ref = useOnClickOutside(
() => {
if (floatingLinkSelectors.mode() === 'insert') {
floatingLinkActions.hide();
focusEditor(editor, editor.selection!);
}
},
{
disabled: !open,
}
});
);

const { update, style, floating } = useVirtualFloatingLink({
editorId: editor.id,
Expand Down

0 comments on commit 310804e

Please sign in to comment.