flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.05k stars 427 forks source link

Capitalization in TextField doesn't work #3564

Closed e-ferrara closed 2 months ago

e-ferrara commented 3 months ago

Duplicate Check

Describe the bug

When upgrading from version 0.22. to 0.23. I noticed that the TextField capitalization stopped working.

Code

import flet as ft

def main(page: ft.Page):
    page.add(ft.TextField(capitalization=ft.TextCapitalization.CHARACTERS))

ft.app(main)

To reproduce

Just type something and alternate between lowercase and uppercase.

Expected behavior

In previous versions, when writing both lowercase and uppercase, the text entered was always seen in uppercase (Using ft.TextCapitalization.CHARACTERS or any other value).

Screenshots

image

Operating System

Windows

Operating system details

Microsoft Windows 11 Pro

Flet version

Version: 0.23.2

Regression

Yes, it used to work in a previous Flet version (please specify the version in additional details)

Suggestions

No response

Additional details

It worked correctly in version 0.22.*.

ndonkoHenri commented 3 months ago

Sorry for that! Will be fixed in a while...

ndonkoHenri commented 2 months ago

Issue has been fixed. Give it a try by installing the latest Flet prerelease: pip install flet --pre (https://pypi.org/project/flet/#history) Report if the issue persists.

julianobramos commented 2 months ago

Hello! Still not working for me. MacBook macOS Sonoma 14.5 Flet 0.23.2

Code:

import flet as ft

def main(page: ft.Page): page.add(ft.TextField(capitalization=ft.TextCapitalization.CHARACTERS))

ft.app(main)

ndonkoHenri commented 2 months ago

My previous message explains how to grab the flet version with the fix.

If it doesn't work try pip install flet -U --pre

julianobramos commented 2 months ago

With "pip install flet -U --pre", worked. Thank you!