correctly handle clicks on reference links

This commit is contained in:
zadam 2020-03-23 20:18:54 +01:00
parent cb168218fb
commit a856463173
3 changed files with 9 additions and 3 deletions

View file

@ -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();

View file

@ -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);

View file

@ -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) {