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

On latest Flutter version, it doesn't work properly #19

Open
guihackmann opened this issue Aug 3, 2021 · 11 comments
Open

On latest Flutter version, it doesn't work properly #19

guihackmann opened this issue Aug 3, 2021 · 11 comments

Comments

@guihackmann
Copy link

guihackmann commented Aug 3, 2021

Hi @LeandroNovak

I've been using this package for many months. But with Flutter version 2.2.3, the behavior has changed, and my masked currency text field is not working properly. If I downgrade Flutter back to 2.0.3 (the previous version I was working with), then it works as expected again.

The issue is that when I type in a masked field on 2.2.3 version, it jumps back to the first character, so the whole text gets typed backwards, which is terrible. When deleting characters, it also jumps to start.

Can you look into this?

@guihackmann guihackmann changed the title On Mac with M1 chip, it doesn't work properly On latest Flutter version, it doesn't work properly Aug 4, 2021
@guihackmann
Copy link
Author

I updated my previous title and issue, as I thought the issue happened because I bought a new MacBook with M1 Chip. But in fact, the problem only happened because I got a later version of Flutter. When downgrading it, it works normally.

@Felipe00
Copy link

Felipe00 commented Aug 9, 2021

Happens with me too. Same flutter version. It jumps one caracter back when mask apply on text.

@LeandroNovak
Copy link
Owner

Can someone tell me if this issue is only for iOS? If so, don't have a mac to check, so I can't fix it.
Everyone fell free to submit a PR.

@walvespit
Copy link

cursorBehavior: CursorBehaviour.end solved for me.

@machadoguilhermebr
Copy link

machadoguilhermebr commented Aug 12, 2021

same problem here

my controller:
final controllerValor = MoneyMaskedTextController(decimalSeparator: ',', thousandSeparator: '.' );

my textfield
TextField(
controller: controllerValor,
style: TextStyle(fontSize: 14),
keyboardType: TextInputType.number,
decoration: InputDecoration(
labelText: "Valor",
hintText: "Valor",
border: OutlineInputBorder(),
),
)

behavior on android/windows: (Flutter 2.2.3)

WhatsApp.Video.2021-08-12.at.12.07.35.mp4

@fabioselau077
Copy link

same problem here

my controller:

final controllerValor = MoneyMaskedTextController(decimalSeparator: ',', thousandSeparator: '.' );

my textfield

TextField(
controller: controllerValor,
style: TextStyle(fontSize: 14),
keyboardType: TextInputType.number,
decoration: InputDecoration(
labelText: "Valor",
hintText: "Valor",
border: OutlineInputBorder(),
),
)
behavior on android/windows: (Flutter 2.2.3)

WhatsApp.Video.2021-08-12.at.12.07.35.mp4

resolveu amigo? msm problema aqui

@guihackmann
Copy link
Author

I downgraded Flutter to version 2.0.3 to "fix" this problem, and still haven't upgraded since. Eventually I will need to find another package in order to upgrade Flutter in case this doesn't get solved.

@fabioselau077
Copy link

Yes, but all packages contains this same issue :/

@machadoguilhermebr
Copy link

I've been using a 2.8.1 flutter version and it's working fine

@guihackmann
Copy link
Author

Yes, but all packages contains this same issue :/

What is your flutter version?

@freemansoft
Copy link

freemansoft commented Aug 17, 2023

@walvespit answer worked for me.

Add a cursorBehavior:CursorBehavior.end property

Example date masked entry:

final TextEditingController controller = MaskedTextController(
mask: '00/00/0000', cursorBehavior: CursorBehaviour.end);

We were fun until upgrading to flutter 3.13.0. Now we need the above text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants