beeware / beeware/toga

iOS App needs a "native" way to remove keyboard from view

Open
#1,236 4 comments 0 reactions 0 assignees View on GitHub
android enhancement iOS
Dominant language
Python
Stars
5.4k
Forks
827
Avg merge
15h 39m
Merged PRs (30d)
40

Description

**Is your feature request related to a problem? Please describe.**

Once the focus is given to a `TextInput` the "soft" keyboard appears on screen, and there appears to be no way to make it go away; it is also impossible to remove the focus from the input box.

**Describe the solution you'd like**

A method added to `main_window` such as `hide_keyboard()` (but appreciate it's not portable across platforms) or a `focus(False)` improvement on the `TextInput` whose side-effect is to make the keyboard slide away.

**Describe alternatives you've considered**
I tried to give `focus()` to non-input elements (such as labels or buttons) but without any effect.

**Additional context**

See the screenshot: essentially half of the app is not visible even though the need for the keyboard now is gone.

![IMG_3589](https://user-images.githubusercontent.com/1153951/112784928-ad347880-9007-11eb-8ff8-a284507d94a9.jpeg)

Contributor guide

Open the contributing guide

Research direction

Start by tracing TextInput focus handling and the iOS-specific main_window implementation; the issue names no files or tests. Determine how focus is removed on iOS and verify that the keyboard dismisses without affecting the portable behavior of other platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, python
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.