Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: remove link not working on desktop/web

thecodrrac177222bb44
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 7b4069244..420c3b64c 100644
--- a/packages/editor/src/toolbar/floating-menus/hover-popup/index.tsx
+++ b/packages/editor/src/toolbar/floating-menus/hover-popup/index.tsx
@@ -38,7 +38,6 @@ export function HoverPopupHandler(props: FloatingMenuProps) {
if (isInsidePopup) return;
if (isOutsideEditor || !isActiveElement) {
- console.log("HIDING", isOutsideEditor, isActiveElement, element);
activePopup.current.hide();
activePopup.current = undefined;
return;
diff --git a/packages/editor/src/toolbar/tools/link.tsx b/packages/editor/src/toolbar/tools/link.tsx
index ae4cdc30f..5e0c0fea2 100644
--- a/packages/editor/src/toolbar/tools/link.tsx
+++ b/packages/editor/src/toolbar/tools/link.tsx
@@ -120,7 +120,10 @@ export function RemoveLink(props: ToolProps) {
toggled={false}
onClick={() => {
if (selectedNode)
- editor.current?.commands.setTextSelection(selectedNode.from);
+ editor.current?.commands.setTextSelection({
+ from: selectedNode.from,
+ to: selectedNode.to,
+ });
editor.current?.chain().focus().unsetLink().run();
}}
/>