feat: focus the previous/next message when one is deleted. If 0 messages, focus input
This commit is contained in:
@@ -231,7 +231,9 @@ export class MainView extends View {
|
||||
itm.onKeyDown((key: string, alt: boolean | undefined, shift: boolean | undefined, ctrl: boolean | undefined) => {
|
||||
if (key === "Delete") {
|
||||
this.removeMessage(message.id);
|
||||
this.messageInput.focus()
|
||||
if (this.messageList.children.length === 1) {
|
||||
this.messageInput.focus()
|
||||
}
|
||||
}
|
||||
});
|
||||
return itm;
|
||||
|
Reference in New Issue
Block a user