Skip to content

Commit

Permalink
fix: template note getting unselected after typing
Browse files Browse the repository at this point in the history
  • Loading branch information
amanharwara committed Oct 21, 2022
1 parent 856e499 commit d3ed439
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,15 @@ export class ItemListController

const activeItem = activeController?.item

if (this.shouldSelectFirstItem(itemsReloadSource)) {
if (this.shouldSelectActiveItem(activeItem) && activeItem) {
await this.selectionController.selectItem(activeItem.uuid).catch(console.error)
} else if (this.shouldSelectFirstItem(itemsReloadSource)) {
await this.selectFirstItem()
} else if (this.shouldCloseActiveItem(activeItem) && activeController) {
this.closeItemController(activeController)
this.selectionController.selectNextItem()
} else if (this.shouldSelectNextItemOrCreateNewNote(activeItem)) {
await this.selectNextItemOrCreateNewNote()
} else if (this.shouldSelectActiveItem(activeItem) && activeItem) {
await this.selectionController.selectItem(activeItem.uuid).catch(console.error)
}
}

Expand Down

0 comments on commit d3ed439

Please sign in to comment.