From 20b45853617933266c66006bc215a24e708a2918 Mon Sep 17 00:00:00 2001 From: 01zulfi <85733202+01zulfi@users.noreply.github.com> Date: Mon, 17 Aug 2026 10:11:46 +0500 Subject: [PATCH] editor: fix multiple link hover popups from opening (#10233) * also fix the popup not opening when quickly hovering one link after another Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com> --- .../src/toolbar/floating-menus/hover-popup/index.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/editor/src/toolbar/floating-menus/hover-popup/index.tsx b/packages/editor/src/toolbar/floating-menus/hover-popup/index.tsx index 94c3741d7..679bdc474 100644 --- a/packages/editor/src/toolbar/floating-menus/hover-popup/index.tsx +++ b/packages/editor/src/toolbar/floating-menus/hover-popup/index.tsx @@ -70,16 +70,12 @@ export function HoverPopupHandler(props: FloatingMenuProps) { const element = e.target; if (activePopup.current) { - const isOutsideEditor = !element.closest(".ProseMirror"); const isInsidePopup = element.closest(".popup-presenter-portal"); const isActiveElement = activePopup.current.element === element; - if (isInsidePopup) return; + if (isInsidePopup || isActiveElement) return; - if (isOutsideEditor || !isActiveElement) { - activePopup.current.hide(); - activePopup.current = undefined; - return; - } + activePopup.current.hide(); + activePopup.current = undefined; } clearTimeout(hoverTimeoutId.current);