From 2474b77c38f666d5dcd8bffa0efb7bb0fb6302b4 Mon Sep 17 00:00:00 2001 From: Andrey Marchuk <16564359+AndreyMarchuk@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:52:49 -0700 Subject: [PATCH 1/2] Update submitFloatingLink.ts Fix https://github.com/udecode/plate/issues/2674 when Enter is pressed on link floating toolbar --- packages/link/src/transforms/submitFloatingLink.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/link/src/transforms/submitFloatingLink.ts b/packages/link/src/transforms/submitFloatingLink.ts index 86b9afe34d..2321a75d1f 100644 --- a/packages/link/src/transforms/submitFloatingLink.ts +++ b/packages/link/src/transforms/submitFloatingLink.ts @@ -39,7 +39,9 @@ export const submitFloatingLink = (editor: PlateEditor) => { skipValidation: true, }); - focusEditor(editor, editor.selection!); + setTimeout(() => { + focusEditor(editor, editor.selection!); + }, 0); return true; }; From a290ecc599e753fe78c40b8408268613617ca481 Mon Sep 17 00:00:00 2001 From: Ziad Beyens Date: Tue, 17 Oct 2023 10:01:35 +0200 Subject: [PATCH 2/2] Create fast-eggs-burn.md --- .changeset/fast-eggs-burn.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fast-eggs-burn.md diff --git a/.changeset/fast-eggs-burn.md b/.changeset/fast-eggs-burn.md new file mode 100644 index 0000000000..b250211206 --- /dev/null +++ b/.changeset/fast-eggs-burn.md @@ -0,0 +1,5 @@ +--- +"@udecode/plate-link": patch +--- + +Fix: "Cannot resolve a DOM node from Slate node" floating link case