Skip to content

Build your personal knowledge base with Trilium Notes

correctly handle clicks on reference links

zadama85646317391
diff --git a/src/public/javascripts/services/link.js b/src/public/javascripts/services/link.js
index 7879c171ed..edae931bcc 100644
--- a/src/public/javascripts/services/link.js
+++ b/src/public/javascripts/services/link.js
@@ -151,7 +151,7 @@ $(document).on('mousedown', '.note-detail-text a', function (e) {
$(document).on('mousedown', '.note-detail-book a', goToLink);
$(document).on('mousedown', '.note-detail-render a', goToLink);
-$(document).on('mousedown', '.note-detail-text.ck-read-only a', goToLink);
+$(document).on('mousedown', '.note-detail-text.ck-read-only a,.note-detail-text a.reference-link', goToLink);
$(document).on('mousedown', 'a.ck-link-actions__preview', goToLink);
$(document).on('click', 'a.ck-link-actions__preview', e => {
e.preventDefault();
diff --git a/src/public/javascripts/services/ws.js b/src/public/javascripts/services/ws.js
index 0fe4ce0b6b..c590d7e461 100644
--- a/src/public/javascripts/services/ws.js
+++ b/src/public/javascripts/services/ws.js
@@ -50,7 +50,13 @@ async function handleMessage(event) {
$outstandingSyncsCount.html(message.outstandingSyncs);
if (syncRows.length > 0) {
- console.debug(utils.now(), "Sync data: ", syncRows);
+ const filteredRows = syncRows.filter(row =>
+ row.entityName !== 'recent_notes'
+ && (row.entityName !== 'options' || row.entityId !== 'openTabs'));
+
+ if (filteredRows.length > 0) {
+ console.debug(utils.now(), "Sync data: ", filteredRows);
+ }
syncDataQueue.push(...syncRows);
diff --git a/src/public/javascripts/widgets/note_tree.js b/src/public/javascripts/widgets/note_tree.js
index a7578dcecf..5a4a306cc0 100644
--- a/src/public/javascripts/widgets/note_tree.js
+++ b/src/public/javascripts/widgets/note_tree.js
@@ -435,7 +435,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
oldActiveNode.setFocus(false);
}
- if (this.tabContext && this.tabContext.notePath) {
+ if (this.tabContext && this.tabContext.notePath && !this.tabContext.note.isDeleted) {
const newActiveNode = await this.getNodeFromPath(this.tabContext.notePath);
if (newActiveNode) {