mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 18:39:22 +08:00
fixed switching between note clones
This commit is contained in:
parent
664a87cdd5
commit
550bb77ca9
@ -42,20 +42,24 @@ const link = (function() {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const linkEl = $(e.target);
|
const linkEl = $(e.target);
|
||||||
const address = linkEl.attr("note-path") ? linkEl.attr("note-path") : linkEl.attr('href');
|
let notePath = linkEl.attr("note-path");
|
||||||
|
|
||||||
if (!address) {
|
if (!notePath) {
|
||||||
return;
|
const address = linkEl.attr("note-path") ? linkEl.attr("note-path") : linkEl.attr('href');
|
||||||
|
|
||||||
|
if (!address) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (address.startsWith('http')) {
|
||||||
|
window.open(address, '_blank');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
notePath = getNotePathFromLink(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (address.startsWith('http')) {
|
|
||||||
window.open(address, '_blank');
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const notePath = getNotePathFromLink(address);
|
|
||||||
|
|
||||||
noteTree.activateNode(notePath);
|
noteTree.activateNode(notePath);
|
||||||
|
|
||||||
// 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user