Merge remote-tracking branch 'origin/stable'

This commit is contained in:
zadam 2021-03-17 23:20:28 +01:00
commit 59e8cb8c8b
3 changed files with 11 additions and 3 deletions

View File

@ -797,8 +797,10 @@ export default class NoteTreeWidget extends TabAwareWidget {
const node = await this.expandToNote(activeContext.notePath);
await node.makeVisible({scrollIntoView: true});
node.setActive(true, {noEvents: true, noFocus: false});
if (node) {
await node.makeVisible({scrollIntoView: true});
node.setActive(true, {noEvents: true, noFocus: false});
}
}
}
@ -851,7 +853,11 @@ export default class NoteTreeWidget extends TabAwareWidget {
// these are real notes with real notePath, user can display them in a detail
// but they don't have a node in the tree
ws.logError(`Can't find node for child node of noteId=${childNoteId} for parent of noteId=${parentNode.data.noteId} and hoistedNoteId=${hoistedNoteService.getHoistedNoteId()}, requested path is ${notePath}`);
const childNote = await treeCache.getNote(childNoteId);
if (!childNote || childNote.type !== 'image') {
ws.logError(`Can't find node for child node of noteId=${childNoteId} for parent of noteId=${parentNode.data.noteId} and hoistedNoteId=${hoistedNoteService.getHoistedNoteId()}, requested path is ${notePath}`);
}
}
return;

View File

@ -5,6 +5,7 @@ const TPL = `
<style>
.note-detail-read-only-code {
position: relative;
min-height: 50px;
}
.note-detail-read-only-code-content {

View File

@ -25,6 +25,7 @@ const TPL = `
padding-top: 10px;
font-family: var(--detail-text-font-family);
position: relative;
min-height: 50px;
}
.note-detail-readonly-text p:first-child, .note-detail-readonly-text::before {