mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix for not working keyboard navigation after context menu (de)activation by handling this with hotkeys plugin
This commit is contained in:
parent
0dc142ff06
commit
7dcd80bd81
@ -432,11 +432,27 @@ const noteTree = (function() {
|
|||||||
},
|
},
|
||||||
"f2": node => {
|
"f2": node => {
|
||||||
editTreePrefix.showDialog(node);
|
editTreePrefix.showDialog(node);
|
||||||
|
},
|
||||||
|
// code below shouldn't be necessary normally, however there's some problem with interaction with context menu plugin
|
||||||
|
// after opening context menu, standard shortcuts don't work, but they are detected here
|
||||||
|
// so we essentially takeover the standard handling with our implementation.
|
||||||
|
"left": node => {
|
||||||
|
node.navigate($.ui.keyCode.LEFT, true);
|
||||||
|
},
|
||||||
|
"right": node => {
|
||||||
|
node.navigate($.ui.keyCode.RIGHT, true);
|
||||||
|
},
|
||||||
|
"up": node => {
|
||||||
|
node.navigate($.ui.keyCode.UP, true);
|
||||||
|
},
|
||||||
|
"down": node => {
|
||||||
|
node.navigate($.ui.keyCode.DOWN, true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
treeEl.fancytree({
|
treeEl.fancytree({
|
||||||
autoScroll: true,
|
autoScroll: true,
|
||||||
|
keyboard: false, // we takover keyboard handling in the hotkeys plugin
|
||||||
extensions: ["hotkeys", "filter", "dnd", "clones"],
|
extensions: ["hotkeys", "filter", "dnd", "clones"],
|
||||||
source: noteTree,
|
source: noteTree,
|
||||||
scrollParent: $("#tree"),
|
scrollParent: $("#tree"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user