mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
prevent paste on middle click, fixes #2995
This commit is contained in:
@@ -178,6 +178,16 @@ $(document).on('dblclick', "a", e => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on('mousedown', 'a', e => {
|
||||||
|
if (e.which === 2) {
|
||||||
|
// prevent paste on middle click
|
||||||
|
// https://github.com/zadam/trilium/issues/2995
|
||||||
|
// https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event#preventing_default_actions
|
||||||
|
e.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
getNotePathFromUrl,
|
getNotePathFromUrl,
|
||||||
createNoteLink,
|
createNoteLink,
|
||||||
|
|||||||
Reference in New Issue
Block a user