make sure all keyboard shortcuts use utility methods to not break mobile frontend

This commit is contained in:
zadam
2019-08-12 22:41:53 +02:00
parent 493cd1a7e0
commit f30eec7737
10 changed files with 41 additions and 41 deletions

View File

@@ -769,7 +769,7 @@ messagingService.subscribeToSyncMessages(syncData => {
}
});
utils.bindShortcut('ctrl+o', async () => {
utils.bindGlobalShortcut('ctrl+o', async () => {
const node = getActiveNode();
const parentNoteId = node.data.parentNoteId;
const isProtected = await treeUtils.getParentProtectedStatus(node);
@@ -815,9 +815,9 @@ async function reloadNote(noteId) {
window.glob.createNoteInto = createNoteInto;
utils.bindShortcut('ctrl+p', createNoteInto);
utils.bindGlobalShortcut('ctrl+p', createNoteInto);
utils.bindShortcut('ctrl+.', scrollToActiveNote);
utils.bindGlobalShortcut('ctrl+.', scrollToActiveNote);
$(window).bind('hashchange', async function() {
if (isNotePathInAddress()) {
@@ -845,7 +845,7 @@ $tree.on('mousedown', '.fancytree-title', e => {
}
});
utils.bindShortcut('alt+c', () => collapseTree()); // don't use shortened form since collapseTree() accepts argument
utils.bindGlobalShortcut('alt+c', () => collapseTree()); // don't use shortened form since collapseTree() accepts argument
$collapseTreeButton.click(() => collapseTree());
$createTopLevelNoteButton.click(createNewTopLevelNote);