Allow middle click (#8725)

This commit is contained in:
Josiah "Rebase" Roberts authored and GitHub committed 2025-03-19 16:27:47 -07:00
1 parent 0a9e76f600
commit ae249f720d
1 file changed
+4 -1
+4 -1
View File
@@ -179,7 +179,10 @@ export default class Link extends Mark {
},
mousedown: (view: EditorView, event: MouseEvent) => {
const target = (event.target as HTMLElement)?.closest("a");
if (!(target instanceof HTMLAnchorElement) || event.button !== 0) {
if (
!(target instanceof HTMLAnchorElement) ||
(event.button !== 0 && event.button !== 1)
) {
return false;
}