diff --git a/shared/editor/marks/Link.tsx b/shared/editor/marks/Link.tsx index b9a25d5ea..efea8bcdb 100644 --- a/shared/editor/marks/Link.tsx +++ b/shared/editor/marks/Link.tsx @@ -176,7 +176,7 @@ export default class Link extends Mark { return false; } - if (event.target.classList.contains("attachment")) { + if (event.target.matches(".component-attachment *")) { return false; } @@ -211,6 +211,10 @@ export default class Link extends Mark { return false; } + if (event.target.matches(".component-attachment *")) { + return false; + } + // Prevent all default click behavior of links, see mousedown above // for custom link handling. if (this.options.onClickLink) {