diff --git a/app/frontend/src/javascript/components/base/text-editor/menu-bar.tsx b/app/frontend/src/javascript/components/base/text-editor/menu-bar.tsx index d3d74b28b..a984c473f 100644 --- a/app/frontend/src/javascript/components/base/text-editor/menu-bar.tsx +++ b/app/frontend/src/javascript/components/base/text-editor/menu-bar.tsx @@ -47,6 +47,10 @@ export const MenuBar: React.FC = ({ editor, heading, bulletList, b if (submenu !== type) { setSubmenu(type); if (type === 'link') { + if (editor.view.state.selection.from === editor.view.state.selection.to) { + setSubmenu(''); + return; + } const previousUrl = { href: editor.getAttributes('link').href, target: editor.getAttributes('link').target || ''