diff --git a/src/public/javascripts/services/tab_manager.js b/src/public/javascripts/services/tab_manager.js index 16b921cc2..3049429fe 100644 --- a/src/public/javascripts/services/tab_manager.js +++ b/src/public/javascripts/services/tab_manager.js @@ -227,8 +227,8 @@ export default class TabManager extends Component { if (this.tabContexts.length <= 1) { this.openAndActivateEmptyTab(); } - else { - this.activateNextTabEvent(); + else if (tabContextToRemove.isActive()) { + this.activateNextTabCommand(); } this.children = this.children.filter(tc => tc.tabId !== tabId); diff --git a/src/public/javascripts/widgets/type_widgets/empty.js b/src/public/javascripts/widgets/type_widgets/empty.js index b166b0527..e6df0effa 100644 --- a/src/public/javascripts/widgets/type_widgets/empty.js +++ b/src/public/javascripts/widgets/type_widgets/empty.js @@ -31,11 +31,14 @@ export default class EmptyTypeWidget extends TypeWidget { }); noteAutocompleteService.showRecentNotes(this.$autoComplete); - this.$autoComplete.trigger('focus'); return this.$widget; } + doRefresh(note) { + this.$autoComplete.trigger('focus'); + } + getContent() {} focus() {}