Skip to content

Commit

Permalink
Fix floating link insert popup closing other editors popups (#1976)
Browse files Browse the repository at this point in the history
* Fix floating link insert popup closing other editors popups

* Create few-elephants-roll.md

Co-authored-by: Ziad Beyens <[email protected]>
  • Loading branch information
O4epegb and zbeyens authored Nov 7, 2022
1 parent 9fc7cde commit 28679ac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-elephants-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@udecode/plate-link": patch
---

Fixes #1771
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

2 comments on commit 28679ac

@vercel
Copy link

@vercel vercel bot commented on 28679ac Nov 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

plate – ./

plate-git-main-udecode.vercel.app
plate-udecode.vercel.app
plate.udecode.io
www.plate.udecode.io

@vercel
Copy link

@vercel vercel bot commented on 28679ac Nov 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

plate-examples – ./

plate-examples.vercel.app
plate-examples-udecode.vercel.app
plate-examples-git-main-udecode.vercel.app

Please sign in to comment.