mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-21 22:19:41 +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({
|
||||
key: new PluginKey("handleClickLink"),
|
||||
props: {
|
||||
handleClick: (view, pos, event) => {
|
||||
handleDOMEvents: {
|
||||
click: (view, event) => {
|
||||
const isMainClick = event.button === 0;
|
||||
const isAuxClick = event.button === 1;
|
||||
if (!isMainClick && !isAuxClick) {
|
||||
@@ -72,5 +73,6 @@ export function clickHandler(options: ClickHandlerOptions): Plugin {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user