fixed jump to note

This commit is contained in:
azivner
2017-11-19 20:36:13 -05:00
parent 658f4872af
commit c8aaf6085d
6 changed files with 39 additions and 25 deletions

View File

@@ -31,7 +31,7 @@ const addLink = (function() {
minLength: 0,
change: () => {
const val = autoCompleteEl.val();
const noteId = link.getNodeIdFromLabel(val);
const noteId = link.getNodePathFromLabel(val);
if (noteId) {
setDefaultLinkTitle(noteId);
@@ -40,7 +40,7 @@ const addLink = (function() {
// this is called when user goes through autocomplete list with keyboard
// at this point the item isn't selected yet so we use supplied ui.item to see where the cursor is
focus: (event, ui) => {
const noteId = link.getNodeIdFromLabel(ui.item.value);
const noteId = link.getNodePathFromLabel(ui.item.value);
setDefaultLinkTitle(noteId);
}
@@ -50,7 +50,7 @@ const addLink = (function() {
formEl.submit(() => {
let val = autoCompleteEl.val();
const noteId = link.getNodeIdFromLabel(val);
const noteId = link.getNodePathFromLabel(val);
if (noteId) {
const linkTitle = linkTitleEl.val();