shortcuts improvements

This commit is contained in:
zadam
2022-11-26 14:57:39 +01:00
parent 6883b71ce7
commit 6a9ac6f90a
9 changed files with 97 additions and 23 deletions

View File

@@ -53,6 +53,16 @@ function getHiddenRoot() {
hidden.addLabel("docName", "hidden");
}
const MAX_POS = 999_999_999;
const branch = hidden.getBranches()[0];
if (branch.notePosition !== MAX_POS) {
// we want to keep the hidden subtree always last, otherwise there will be problems with e.g. keyboard navigation
// over tree when it's in the middle
branch.notePosition = MAX_POS;
branch.save();
}
return hidden;
}