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 opening links in attr detail
zadam3c224e80eee2
diff --git a/package-lock.json b/package-lock.jsonindex 52f6d5af49..f2ded96c0e 100644--- a/package-lock.json+++ b/package-lock.json@@ -1882,7 +1882,7 @@},"readable-stream": {"version": "1.1.14",- "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz","integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=","requires": {"core-util-is": "~1.0.0",@@ -2930,7 +2930,7 @@},"readable-stream": {"version": "1.1.14",- "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz","integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=","requires": {"core-util-is": "~1.0.0",@@ -5997,7 +5997,7 @@},"minimist": {"version": "1.2.0",- "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz","integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="},"minipass": {@@ -6118,7 +6118,7 @@},"mkdirp": {"version": "0.5.1",- "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz","integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=","requires": {"minimist": "0.0.8"@@ -6126,7 +6126,7 @@"dependencies": {"minimist": {"version": "0.0.8",- "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz","integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="}}@@ -7067,7 +7067,7 @@},"readable-stream": {"version": "2.3.6",- "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz","integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==","requires": {"core-util-is": "~1.0.0",@@ -8145,7 +8145,7 @@},"strip-ansi": {"version": "3.0.1",- "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz","integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=","requires": {"ansi-regex": "^2.0.0"diff --git a/src/public/app/services/link.js b/src/public/app/services/link.jsindex 73bc29c34c..d5f9c28b11 100644--- a/src/public/app/services/link.js+++ b/src/public/app/services/link.js@@ -83,9 +83,6 @@ function goToLink(e) {const activeTabContext = appContext.tabManager.getActiveTabContext();activeTabContext.setNote(notePath);}- else {- return false;- }}else {if (e.which === 1) {@@ -95,9 +92,6 @@ function goToLink(e) {window.open(address, '_blank');}}- else {- return false;- }}return true;@@ -132,7 +126,8 @@ function linkContextMenu(e) {});}-$(document).on('mousedown', "a", goToLink);+$(document).on('click', "a", goToLink);+$(document).on('auxclick', "a", goToLink); // to handle middle button$(document).on('contextmenu', 'a', linkContextMenu);export default {diff --git a/src/public/app/widgets/attribute_detail.js b/src/public/app/widgets/attribute_detail.jsindex c494e325e6..162f148b6e 100644--- a/src/public/app/widgets/attribute_detail.js+++ b/src/public/app/widgets/attribute_detail.js@@ -52,6 +52,10 @@ const TPL = `display: flex;margin-top: 15px;}++ .attr-detail input[readonly] {+ background-color: var(--accented-background-color) !important;+ }</style><div style="display: flex; justify-content: space-between;">@@ -265,7 +269,8 @@ export default class AttributeDetailWidget extends TabAwareWidget {$(window).on('mouseup', e => {if (!$(e.target).closest(this.$widget[0]).length- && !$(e.target).closest(".algolia-autocomplete").length) {+ && !$(e.target).closest(".algolia-autocomplete").length+ && !$(e.target).closest("#context-menu-container").length) {this.hide();}});diff --git a/src/public/app/widgets/attribute_editor.js b/src/public/app/widgets/attribute_editor.jsindex 5fd72b614f..ebf1e64894 100644--- a/src/public/app/widgets/attribute_editor.js+++ b/src/public/app/widgets/attribute_editor.js@@ -34,7 +34,7 @@ const TPL = `.add-new-attribute-button {color: var(--muted-text-color);position: absolute;- bottom: 3px;+ bottom: 2px;right: 0;cursor: pointer;border: 1px solid transparent;