mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix go to internal note link
This commit is contained in:
parent
bb0acec4a2
commit
fe81fcf332
@ -42,7 +42,7 @@ const link = (function() {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const linkEl = $(e.target);
|
const linkEl = $(e.target);
|
||||||
const notePath = linkEl.attr("note-path") ? linkEl.attr("note-path") : linkEl.attr('href');
|
const notePath = linkEl.attr("note-path") ? linkEl.attr("note-path") : getNotePathFromLink(linkEl.attr('href'));
|
||||||
|
|
||||||
if (!notePath) {
|
if (!notePath) {
|
||||||
return;
|
return;
|
||||||
@ -54,13 +54,7 @@ const link = (function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const noteId = getNotePathFromLink(notePath);
|
noteTree.activateNode(notePath);
|
||||||
|
|
||||||
if (!noteId) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
noteTree.activateNode(noteId);
|
|
||||||
|
|
||||||
// this is quite ugly hack, but it seems like we can't close the tooltip otherwise
|
// this is quite ugly hack, but it seems like we can't close the tooltip otherwise
|
||||||
$("[role='tooltip']").remove();
|
$("[role='tooltip']").remove();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user