Skip to content

Commit

Permalink
fix(editor): focussed field in event update
Browse files Browse the repository at this point in the history
  • Loading branch information
maarten2424 committed May 8, 2024
1 parent d6eb96c commit 7a9bc0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/editor/src/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@ const EditorContent = ({
}

if (event.data.type === "@easyblocks-editor/paste-items") {
console.log(focussedField);

actions.pasteItems(event.data.payload.configs);
}

Expand Down Expand Up @@ -1059,7 +1061,7 @@ const EditorContent = ({
window.addEventListener("message", handleEditorEvents);

return () => window.removeEventListener("message", handleEditorEvents);
}, []);
}, [focussedField]);

const shopstoryCanvasIframe = useRef<HTMLIFrameElement | null>(null);

Expand Down

0 comments on commit 7a9bc0b

Please sign in to comment.