Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in TextField with TextCapitalization.WORDS #4859

Open
1 task done
Jorwinn opened this issue Feb 9, 2025 · 1 comment
Open
1 task done

Crash in TextField with TextCapitalization.WORDS #4859

Jorwinn opened this issue Feb 9, 2025 · 1 comment
Labels
bug Something isn't working controls has reproducible steps Issue is reproducible platform: mac Specific to macOS

Comments

@Jorwinn
Copy link

Jorwinn commented Feb 9, 2025

Duplicate Check

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

  1. Run the code.
  2. Press the spacebar three times.
  3. 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

Captures

Crash Screenshot

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

@ndonkoHenri ndonkoHenri added bug Something isn't working controls has reproducible steps Issue is reproducible platform: mac Specific to macOS labels Feb 9, 2025
@ndonkoHenri
Copy link
Contributor

I was able to repro:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working controls has reproducible steps Issue is reproducible platform: mac Specific to macOS
Projects
None yet
Development

No branches or pull requests

2 participants