Skip to content

Commit

Permalink
widget: request software-keyboard on focus
Browse files Browse the repository at this point in the history
Signed-off-by: inkeliz <[email protected]>
  • Loading branch information
inkeliz committed Jul 4, 2023
1 parent ef78b70 commit 1934b4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions widget/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ func (e *Editor) processKey(gtx layout.Context) {
switch ke := ke.(type) {
case key.FocusEvent:
e.focused = ke.Focus
if e.focused {
key.SoftKeyboardOp{Show: true}.Add(gtx.Ops)
}
// Reset IME state.
e.ime.imeState = imeState{}
case key.Event:
Expand Down

0 comments on commit 1934b4f

Please sign in to comment.