浏览代码

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
 	}