Skip to content

Commit

Permalink
Fix text field bluring
Browse files Browse the repository at this point in the history
  • Loading branch information
psanford committed Nov 30, 2024
1 parent 748fea5 commit 1d80e61
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (

"gioui.org/app"
"gioui.org/io/event"
"gioui.org/io/key"
"gioui.org/layout"
"gioui.org/op"
"gioui.org/op/clip"
Expand Down Expand Up @@ -222,8 +223,7 @@ func (ui *UI) loop(w *app.Window) error {

if sendTextClicked {
func() {
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// key.FocusOp{}.Add(&ops) // blur textfield
gtx.Execute(key.FocusCmd{}) // blur textfield

msg := textMsgEditor.Text()
if msg == "" {
Expand Down Expand Up @@ -280,8 +280,7 @@ func (ui *UI) loop(w *app.Window) error {
statusMsg = "Start recv"
w.Invalidate()

// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// key.FocusOp{}.Add(&ops) // blur textfield
gtx.Execute(key.FocusCmd{}) // blur textfield
code := recvCodeEditor.Text()
if code == "" {
return
Expand Down

0 comments on commit 1d80e61

Please sign in to comment.