~eliasnaur/gio

9843176adbff89b2c9d2d2342c9ea1bb819f8edf — Elias Naur 8 months ago 002a66f
widget: don't process key releases as presses in Editor

Fixes gio#171

Signed-off-by: Elias Naur <mail@eliasnaur.com>
1 files changed, 1 insertions(+), 1 deletions(-)

M widget/editor.go
M widget/editor.go => widget/editor.go +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) {