소스 검색

feat: focus MessagesText widget on cancel

ayn2op 3 년 전
부모
커밋
e494d7811d
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      attachment_image.go

+ 1 - 0
attachment_image.go

@@ -49,6 +49,7 @@ func newAttachmentImage(a discord.Attachment) (*AttachmentImage, error) {
 func (ai *AttachmentImage) onInputCapture(event *tcell.EventKey) *tcell.EventKey {
 	if event.Name() == cfg.Keys.Cancel {
 		app.SetRoot(mainFlex, true)
+		app.SetFocus(messagesText)
 		return nil
 	}