mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-19 13:09:30 +01:00
Merge pull request #8364 from 01zulfi/editor/fix-readonly-links
editor: fix internal links opening in new tab in readonly notes
This commit is contained in:
@@ -30,7 +30,8 @@ export function clickHandler(options: ClickHandlerOptions): Plugin {
|
|||||||
return new Plugin({
|
return new Plugin({
|
||||||
key: new PluginKey("handleClickLink"),
|
key: new PluginKey("handleClickLink"),
|
||||||
props: {
|
props: {
|
||||||
handleClick: (view, pos, event) => {
|
handleDOMEvents: {
|
||||||
|
click: (view, event) => {
|
||||||
const isMainClick = event.button === 0;
|
const isMainClick = event.button === 0;
|
||||||
const isAuxClick = event.button === 1;
|
const isAuxClick = event.button === 1;
|
||||||
if (!isMainClick && !isAuxClick) {
|
if (!isMainClick && !isAuxClick) {
|
||||||
@@ -72,5 +73,6 @@ export function clickHandler(options: ClickHandlerOptions): Plugin {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user