mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
Merge branch 'stable'
# Conflicts: # package-lock.json # package.json
This commit is contained in:
@@ -562,7 +562,7 @@ async function collapseTree(node = null) {
|
||||
}
|
||||
|
||||
function focusTree() {
|
||||
$tree.find('.fancytree-container').focus();
|
||||
getTree().setFocus();
|
||||
}
|
||||
|
||||
async function scrollToActiveNote() {
|
||||
@@ -573,8 +573,8 @@ async function scrollToActiveNote() {
|
||||
|
||||
const node = await expandToNote(activeContext.notePath);
|
||||
|
||||
node.makeVisible({scrollIntoView: true});
|
||||
node.setFocus(true);
|
||||
await node.makeVisible({scrollIntoView: true});
|
||||
node.setFocus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -769,7 +769,7 @@ messagingService.subscribeToOutsideSyncMessages(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);
|
||||
|
||||
Reference in New Issue
Block a user