From e5036318af217c8d9e267bbf7bf462efef71e801 Mon Sep 17 00:00:00 2001 From: zadam Date: Wed, 3 Jul 2019 20:29:55 +0200 Subject: [PATCH] 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");