Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix context submenus, closes #810
zadamccaa9eae3ab2
diff --git a/src/public/javascripts/services/context_menu.js b/src/public/javascripts/services/context_menu.jsindex 713490a55d..a0baa028ef 100644--- a/src/public/javascripts/services/context_menu.js+++ b/src/public/javascripts/services/context_menu.js@@ -76,8 +76,7 @@ async function initContextMenu(event, contextMenu) {// in such case we'll position it above click coordinates so it will fit into clientconst clickPosition = event.pageY;const clientHeight = document.documentElement.clientHeight;- const contextMenuHeight = $contextMenuContainer.height();-+ const contextMenuHeight = $contextMenuContainer.outerHeight() + 30;let top;if (clickPosition + contextMenuHeight > clientHeight) {diff --git a/src/public/stylesheets/desktop.css b/src/public/stylesheets/desktop.cssindex affa5d15a8..078e6b7e0f 100644--- a/src/public/stylesheets/desktop.css+++ b/src/public/stylesheets/desktop.css@@ -110,7 +110,7 @@ body {#context-menu-container {max-height: 100vh;- overflow: auto; /* make it scrollable when exceeding total height of the window */+ /* !!! Cannot set overflow: auto, submenus will break !!! */}#context-menu-container, #context-menu-container .dropdown-menu {diff --git a/src/services/notes.js b/src/services/notes.jsindex e654a249d7..79b7c193ca 100644--- a/src/services/notes.js+++ b/src/services/notes.js@@ -490,6 +490,8 @@ async function eraseDeletedNotes() {SET isErased = 1,title = NULLWHERE isErased = 0 AND noteId IN (???)`, noteIdsToErase);++ log.info(`Erased notes: ${JSON.stringify(noteIdsToErase)}`);}async function duplicateNote(noteId, parentNoteId) {