fix: Finicky clicking on file attachments #2

This commit is contained in:
Tom Moor
2022-03-06 22:52:41 -08:00
parent 80be26b2de
commit 85f333b2fd

View File

@@ -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) {