mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 02:15:34 +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:
|
case key.FocusEvent:
|
||||||
e.focused = ke.Focus
|
e.focused = ke.Focus
|
||||||
case key.Event:
|
case key.Event:
|
||||||
if !e.focused {
|
if !e.focused || ke.State != key.Press {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if e.Submit && (ke.Name == key.NameReturn || ke.Name == key.NameEnter) {
|
if e.Submit && (ke.Name == key.NameReturn || ke.Name == key.NameEnter) {
|
||||||
|
|||||||
Reference in New Issue
Block a user