Describe the bug
Once a Selection widget has focus, which opens a picker, tapping outside of it never closes the picker — the focus is never relinquished, it seems to me — except if you tap on a WebView. Tapping on a WebView does close the picker.
No "Done" button appears anywhere.
Tapping on one of the options in the picker, or pressing Esc or Enter, don't close the picker either.
Tested on the iOS Simulator.
How to reproduce the bug
- Add a functional Selection widget (or run the attached minimal code example)
- Run the app on iOS (tested on the Simulator)
- Tap on the Selection widget — the picker should open
- Tap any area outside the picker that's not a WebView
- Notice he picker never closes
if you repeat the process but you tap on a WebView, the picker does close.
Minimum example code
"""
My first application
"""
import toga
class HelloWorld(toga.App):
def startup(self):
self.main_box = toga.Box(
style = toga.style.Pack(direction = 'column'),
children = [
# WebView
toga.Box(
style = toga.style.Pack(background_color = "#424242", flex = 1, direction = 'column'),
children = [
toga.Label(
text = "WebView",
style = toga.style.Pack(color = "#FFFFFF")
),
toga.WebView(
style = toga.style.Pack(margin = 8, flex = 1),
url = "https://beeware.org",
),
]
),
toga.Label(
text = "Non-WebView"
),
# Spacer
toga.Box(
style = toga.style.Pack(flex = 1),
),
# Selection
toga.Selection(
items=[
{"name": "Alice", "age": 37},
{"name": "Bob", "age": 42},
{"name": "Charlie", "age": 24},
],
accessor="name",
),
# Spacer
toga.Box(
style = toga.style.Pack(height = 40),
),
]
)
self.main_window = toga.MainWindow(
title = self.formal_name,
content = self.main_box,
)
self.main_window.show()
def main():
return HelloWorld()
Screenshots
No response
Environment details
- Operating system and version: macOS 15.7.4
- Python version: 3.13.13
- Software versions:
- Briefcase: 0.4.4
- Toga: 0.5.6
- iOS Simulator: 26.0 (1062.1)
- Device + iOS Version: iPhone Air / iOS 26.3 (Simulator)
- SimulatorKit: 954.5
- CoreSimulator: 1051.17.8
Logs
Additional context
- Only tested on the iOS Simulator. I don't know if the problem exists on a real device.
- AI told me the convention on the iOS side is applying a global ".endEditing:YES" on the touch layer (enabled for every widget on Toga side, including the currently-selected option but not the rest in the open picker, I suppose), but I can't personally attest to that.
Describe the bug
Once a Selection widget has focus, which opens a picker, tapping outside of it never closes the picker — the focus is never relinquished, it seems to me — except if you tap on a WebView. Tapping on a WebView does close the picker.
No "Done" button appears anywhere.
Tapping on one of the options in the picker, or pressing Esc or Enter, don't close the picker either.
Tested on the iOS Simulator.
How to reproduce the bug
if you repeat the process but you tap on a WebView, the picker does close.
Minimum example code
Screenshots
No response
Environment details
Logs
Additional context