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
mitigation of tooltip flicker by making tooltip smaller
azivner7be85acf117d
diff --git a/src/public/javascripts/services/tooltip.js b/src/public/javascripts/services/tooltip.jsindex d27a7dad00..36273e4cb8 100644--- a/src/public/javascripts/services/tooltip.js+++ b/src/public/javascripts/services/tooltip.js@@ -106,7 +106,6 @@ async function renderTooltip(note, attributes) {else if (note.type === 'image') {content += $("<img>").prop("src", `/api/images/${note.noteId}/${note.title}`)- .prop("style", "max-width: 300px; max-height: 300px;").prop('outerHTML');}// other types of notes don't have tooltip previewdiff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.cssindex 08c262ffba..64184cd716 100644--- a/src/public/stylesheets/style.css+++ b/src/public/stylesheets/style.css@@ -500,14 +500,20 @@ table.promoted-attributes-in-tooltip td, table.promoted-attributes-in-tooltip th.tooltip-inner {background-color: #fbfbfb !important;- max-width: 600px;- max-height: 500px;+ max-width: 400px;+ /* height needs to stay small because tooltip has problem when it can't fit to either top or bottom of the cursor */+ max-height: 300px;overflow: hidden;color: black;border: 1px solid #aaa;text-align: left;}+.tooltip-inner img {+ max-width: 250px;+ max-height: 250px;+}+.tooltip.show {opacity: 1;}