fix enter on title to the code editor

This commit is contained in:
zadam
2019-07-03 20:29:55 +02:00
parent 6d2394a9da
commit e5036318af
2 changed files with 6 additions and 2 deletions

View File

@@ -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");