Open
Description
Duplicate Check
- I have searched the opened issues and there are no duplicates
Describe the bug
When using a TextField
in Flet with capitalization=ft.TextCapitalization.WORDS
, if the user types three consecutive spaces, the application crashes. Instead, macOS displays a system crash report for the Flet executable.
Code sample
Code
import flet as ft
def main(page: ft.Page):
# Write 3 spaces in the TextField
page.add(
ft.TextField(
autofocus=True,
capitalization=ft.TextCapitalization.WORDS,
),
)
ft.app(target=main)
To reproduce
- Run the code.
- Press the spacebar three times.
- The application crashes, and macOS shows an error report.
Expected behavior
The application should not crash. Instead, it should allow multiple spaces without issues, or at least handle the input safely.
Screenshots / Videos
Operating System
macOS
Operating system details
Big Sur 11.7.10
Flet version
0.26.0
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
Logs
No Python traceback was generated.
Additional details
No response