From 6d2394a9daf12fdd07634a1c29073cd86ef5b784 Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 2 Jul 2019 22:26:05 +0200 Subject: [PATCH 1/3] release 0.33.6 --- package.json | 2 +- src/services/build.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ae7afa13d..2c430cb49 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "trilium", "productName": "Trilium Notes", "description": "Trilium Notes", - "version": "0.33.5", + "version": "0.33.6", "license": "AGPL-3.0-only", "main": "electron.js", "bin": { diff --git a/src/services/build.js b/src/services/build.js index efca6b7b8..3984307ae 100644 --- a/src/services/build.js +++ b/src/services/build.js @@ -1 +1 @@ -module.exports = { buildDate:"2019-06-30T21:47:04+02:00", buildRevision: "af21dd4463afdb901a27a075228a4bdf4cd5ecb5" }; +module.exports = { buildDate:"2019-07-02T22:26:05+02:00", buildRevision: "196264b8c2fc626e3114d65423c7110cff99ae85" }; From e5036318af217c8d9e267bbf7bf462efef71e801 Mon Sep 17 00:00:00 2001 From: zadam Date: Wed, 3 Jul 2019 20:29:55 +0200 Subject: [PATCH 2/3] fix enter on title to the code editor --- package-lock.json | 2 +- src/public/javascripts/services/tab_context.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index d5470719e..1303f168b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "trilium", - "version": "0.33.5", + "version": "0.33.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/public/javascripts/services/tab_context.js b/src/public/javascripts/services/tab_context.js index 5e781a859..9eaf6a22c 100644 --- a/src/public/javascripts/services/tab_context.js +++ b/src/public/javascripts/services/tab_context.js @@ -83,7 +83,11 @@ class TabContext { if (utils.isDesktop()) { // keyboard plugin is not loaded in mobile - this.$noteTitle.bind('keydown', 'return', () => this.getComponent().focus()); + this.$noteTitle.bind('keydown', 'return', () => { + this.getComponent().focus(); + + return false; // to not propagate the enter into the editor (causes issues with codemirror) + }); } this.$protectButton = this.$tabContent.find(".protect-button"); From bf3360572a3e59fdeea9b69842c88452cf14b8ba Mon Sep 17 00:00:00 2001 From: zadam Date: Wed, 3 Jul 2019 20:37:59 +0200 Subject: [PATCH 3/3] nest code editor instance to avoid visibility issues --- src/public/javascripts/services/note_detail_code.js | 3 ++- src/public/stylesheets/style.css | 5 ++++- src/views/tabs.ejs | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/public/javascripts/services/note_detail_code.js b/src/public/javascripts/services/note_detail_code.js index 1403d0711..8bde2b9a7 100644 --- a/src/public/javascripts/services/note_detail_code.js +++ b/src/public/javascripts/services/note_detail_code.js @@ -14,6 +14,7 @@ class NoteDetailCode { this.ctx = ctx; this.codeEditor = null; this.$component = ctx.$tabContent.find('.note-detail-code'); + this.$editorEl = this.$component.find('.note-detail-code-editor'); this.$executeScriptButton = ctx.$tabContent.find(".execute-script-button"); utils.bindElShortcut(ctx.$tabContent, "ctrl+return", () => this.executeCurrentNote()); @@ -34,7 +35,7 @@ class NoteDetailCode { CodeMirror.modeURL = 'libraries/codemirror/mode/%N/%N.js'; - this.codeEditor = CodeMirror(this.$component[0], { + this.codeEditor = CodeMirror(this.$editorEl[0], { value: "", viewportMargin: Infinity, indentUnit: 4, diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css index 64b64e004..d33d2d819 100644 --- a/src/public/stylesheets/style.css +++ b/src/public/stylesheets/style.css @@ -357,10 +357,13 @@ div.ui-tooltip { } .note-detail-code { - min-height: 200px; overflow: auto; } +.note-detail-code-editor { + min-height: 200px; +} + .note-detail-render { min-height: 200px; } diff --git a/src/views/tabs.ejs b/src/views/tabs.ejs index 5f0c5560e..d8766f889 100644 --- a/src/views/tabs.ejs +++ b/src/views/tabs.ejs @@ -15,7 +15,9 @@
-
+
+
+
<% include details/empty.ejs %>