Переглянути джерело

fix: if ModAlt is pressed while InputField is focused, do not handle the event

rigormorrtiss 4 роки тому
батько
коміт
4ecd386b61
1 змінених файлів з 5 додано та 0 видалено
  1. 5 0
      discordo.go

+ 5 - 0
discordo.go

@@ -200,6 +200,11 @@ func onMessagesTextViewInputCapture(e *tcell.EventKey) *tcell.EventKey {
 }
 
 func onMessageInputFieldInputCapture(e *tcell.EventKey) *tcell.EventKey {
+	// If the "Alt" modifier key is pressed, do not handle the event.
+	if e.Modifiers() == tcell.ModAlt {
+		return nil
+	}
+
 	switch e.Key() {
 	case tcell.KeyEnter:
 		if selectedChannel == nil {