on iOS on-screen keyboard covers multi-line input item, input is not visible
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 827
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 40
Description
### Describe the bug
I'm building a chat application. Below is sub that generates main window.
On Android (physical device) and on iPhone 7 (simulator), on iPhone 7 (simulator) works well.
On iPhone 7, SE, 15 (physical devices), SE (simulator) when cursor put into multiline input (self.text_input) - virtual keyboard appears and covers input item. So user has no visibility on entered text.
def create_conversation_ui(self):
self.chat = toga.WebView(
url=None,
style=Pack(flex=1),
)
# Buttons
self.text_input = toga.MultilineTextInput(
style=Pack(flex=1, padding=5),
placeholder='Type your',
value = ''
)
self.send_button = toga.Button(
"Send",
on_press=self.handle_send_button,
style=Pack(padding_top=5, padding_right=5),
)
share_feedback_button = toga.Button(
"Share feedback",
on_press=self.handle_share_feedback_button,
style=Pack(padding_top=5, padding_right=5),
)
new_chat_button = toga.Button(
"New chat",
on_press=self.handle_new_chat_button,
style=Pack(padding_top=5, padding_right=5),
)
buttons_box = toga.Box(
children=[self.send_button,
share_feedback_button,
new_chat_button,
toga.Label('id: ' + device_id, style=Pack(color=GRAY))],
style=Pack(direction=COLUMN),
)
input_box = toga.Box(
children=[self.text_input, buttons_box],
style=Pack(direction=ROW),
)
# Outermost box
outer_box = toga.Box(
children=[self.chat, input_box],
style=Pack(direction=COLUMN),
)
return outer_box
### Steps to reproduce
1. Build interface and run on iPhone 7, SE, 15
2. Go to 'Type your' multiline input text
3. See the issue
### Expected behavior
When cursor placed into multiline input and virtual keyboard displayed, application window either scrolls up or webview piece decreased in height so that user can wee both multiline text input and virtual keyboard.
### Screenshots




### Environment
- Operating System: iOS 17.5.1
- Python version: 3.12
- Software versions:
- Briefcase: 0.3.19
- Toga: 0.4.5
### Logs
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Start with the create_conversation_ui entry point and the Toga MultilineTextInput used in the reproduced layout. Reproduce on the listed iOS devices or simulators, then trace the iOS keyboard and window-resizing behavior; done means the multiline input remains visible while the virtual keyboard is displayed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, python
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100