Skip to content

Build your personal knowledge base with Trilium Notes

fix add link + note type chooser combo

zadame0ad256194ef
diff --git a/src/public/app/services/note_types.js b/src/public/app/services/note_types.js
index 4ea9bebf13..523974c137 100644
--- a/src/public/app/services/note_types.js
+++ b/src/public/app/services/note_types.js
@@ -18,7 +18,7 @@ async function getNoteTypeItems(command) {
const templateNoteIds = await server.get("search-templates");
const templateNotes = await froca.getNotes(templateNoteIds);
- if (items.length > 0) {
+ if (templateNotes.length > 0) {
items.push({ title: "----" });
for (const templateNote of templateNotes) {
diff --git a/src/public/app/widgets/dialogs/note_type_chooser.js b/src/public/app/widgets/dialogs/note_type_chooser.js
index 1aebc07cae..7e1ed55dcd 100644
--- a/src/public/app/widgets/dialogs/note_type_chooser.js
+++ b/src/public/app/widgets/dialogs/note_type_chooser.js
@@ -4,6 +4,11 @@ import BasicWidget from "../basic_widget.js";
const TPL = `
<div class="note-type-chooser-dialog modal mx-auto" tabindex="-1" role="dialog">
<style>
+ .note-type-chooser-dialog {
+ /* note type chooser needs to be higher than other dialogs from which it is triggered, e.g. "add link"*/
+ z-index: 1100 !important;
+ }
+
.note-type-dropdown {
position: relative;
font-size: large;