From 043228fe47059af5ba114148a0bdb9df030d0325 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Fri, 24 Feb 2023 09:20:35 +0500 Subject: [PATCH] editor: fix link popup not opening on link focus --- packages/editor/src/toolbar/stores/toolbar-store.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/editor/src/toolbar/stores/toolbar-store.ts b/packages/editor/src/toolbar/stores/toolbar-store.ts index 0ca3e28a0..b75aeab0d 100644 --- a/packages/editor/src/toolbar/stores/toolbar-store.ts +++ b/packages/editor/src/toolbar/stores/toolbar-store.ts @@ -74,7 +74,7 @@ export const useToolbarStore = create((set, get) => ({ set((state) => { state.openedPopups = { ...state.openedPopups, - [id]: false + [id]: undefined }; }), isPopupOpen: (id) => !!get().openedPopups[id], @@ -90,14 +90,14 @@ export const useToolbarStore = create((set, get) => ({ for (const key in state.openedPopups) { const ref = state.openedPopups[key]; if (ref && ref.group === group && !excluded.includes(ref.id)) { - state.openedPopups[key] = false; + state.openedPopups[key] = undefined; } } }), closeAllPopups: () => set((state) => { for (const key in state.openedPopups) { - state.openedPopups[key] = false; + state.openedPopups[key] = undefined; } }) }));