diff --git a/packages/editor/src/core/extensions/custom-link/helpers/clickHandler.ts b/packages/editor/src/core/extensions/custom-link/helpers/clickHandler.ts index 98c795cea3d..1cb5fe5612b 100644 --- a/packages/editor/src/core/extensions/custom-link/helpers/clickHandler.ts +++ b/packages/editor/src/core/extensions/custom-link/helpers/clickHandler.ts @@ -50,6 +50,11 @@ export function clickHandler(options: ClickHandlerOptions): Plugin { return false; } + // Suppress the native anchor navigation: in a non-editable view + // ProseMirror doesn't swallow the click, so without this the + // browser opens a second tab via the underlying + // in addition to the one below (#9386). + event.preventDefault(); window.open(href, target); return true;