From d3ed4391b7f6b77ced485884a97190449a1b5507 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Fri, 21 Oct 2022 16:58:28 +0530 Subject: [PATCH] fix: template note getting unselected after typing --- .../javascripts/Controllers/ItemList/ItemListController.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/web/src/javascripts/Controllers/ItemList/ItemListController.ts b/packages/web/src/javascripts/Controllers/ItemList/ItemListController.ts index 2f568ce36..6e403e67f 100644 --- a/packages/web/src/javascripts/Controllers/ItemList/ItemListController.ts +++ b/packages/web/src/javascripts/Controllers/ItemList/ItemListController.ts @@ -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) } }