1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00

Electron: Disable Control+Click

This commit is contained in:
Laurent Cozic 2017-11-22 19:29:49 +00:00
parent 3ce1172c36
commit 5340fb8af9

View File

@ -33,12 +33,17 @@ Setting.setConstant('appType', 'desktop');
// Disable drag and drop of links inside application (which would
// open it as if the whole app was a browser)
// document.addEventListener('dragover', event => event.preventDefault());
// document.addEventListener('drop', event => event.preventDefault());
document.addEventListener('dragover', event => event.preventDefault());
document.addEventListener('drop', event => event.preventDefault());
// Disable middle-click (which would open a new browser window, but we don't want this)
document.addEventListener('auxclick', event => event.preventDefault());
// Each link (rendered as a button or list item) has its own custom click event
// so disable the default. In particular this will disable Ctrl+Clicking a link
// which would open a new browser window.
document.addEventListener('click', (event) => event.preventDefault());
shimInit();
app().start(bridge().processArgv()).then(() => {