mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
widget: don't process key releases as presses in Editor
Fixes gio#171 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -238,7 +238,7 @@ func (e *Editor) processKey(gtx layout.Context) {
|
||||
case key.FocusEvent:
|
||||
e.focused = ke.Focus
|
||||
case key.Event:
|
||||
if !e.focused {
|
||||
if !e.focused || ke.State != key.Press {
|
||||
break
|
||||
}
|
||||
if e.Submit && (ke.Name == key.NameReturn || ke.Name == key.NameEnter) {
|
||||
|
||||
Reference in New Issue
Block a user