mask_text_input_formatter
mask_text_input_formatter copied to clipboard
Backspace not handled correctly
When you press backspace it removes the character before the last character, and the cursor jumps just before the last character. I can confirm that these issue only appears in flutter 1.22.5+ I think this issue is related to https://github.com/flutter/flutter/pull/67892 somehow... (all functionalities of textfield works as expected without the mast formatter)
Here is the mask formatter I used to test this issue:
var phoneMaskFormatter = new MaskTextInputFormatter(mask: '### ### ####', filter: { "#": RegExp(r'[0-9]') });
Yes, Even i am also facing same issue, below is my regexp MaskTextInputFormatter( mask: '######-##-####', filter: {"#": RegExp(r'[0-9]')})
same issue
Related to https://github.com/flutter/flutter/issues/75502
same issue. I'm using the flutter 1.27.0-2.0.pre.1 and mask_text_input_formatter: ^2.0.0-nullsafety.2
Issue also occurs when keyboardType is set to TextInputType.datetime.
It has been corrected?
It has been corrected?
Tested and is working on 2.1.0-13.0.pre.86
I am using Flutter 2.0.2 and still the problem exists
https://github.com/flutter/flutter/issues/77855#issuecomment-801335050
I have the same problem in flutter 2.0.2, I tested it on a new standard project, easily reproducible, the bug only happens when using a custom keyboardType with visible numbers, such as datetime, number, phone and visiblepassword
Yeah I also have the same problem, but only with a custom keyboardType. Any fix for it?
I performed tests with another package and the behavior did not replicate, so I believe that the problem is not in the flutter
https://github.com/danilocoppi/flutter-textfield-mask
Confirming that I am no longer seeing this issue with the latest Flutter beta
channel (2.1.0-12.2.pre
) and version 1.2.1+
of this package.
Hi, try set keyboardType to TextInputType.number. Just works fine for me
still happens, especially when you press the backspace button on your pc keyboard. When i dont set the input type the backspace button on the android emulator keyboard works as expected but when i press the backspace button on my keyboard its not working as expected. May also not work in flutter web. Im using Flutter 2.0.3 and Plugin Version 1.2.1+
Has there been any update on this problem?
I had to use another package because of this issue: https://github.com/danilocoppi/flutter-textfield-mask
I will try to downgrade the version of the flutter, if it does not work I will try another package
I will try to downgrade the version of the flutter, if it does not work I will try another package
use easy_mask plugin and downgrade flutter version to 1.22.6
same issue!
Flutter (Channel stable, 2.0.4, on macOS 11.2.3 20D91 darwin-x64, locale pt-BR) • Flutter version 2.0.4 • Framework revision b1395592de (2 weeks ago), 2021-04-01 14:25:01 -0700 • Engine revision 2dce47073a • Dart version 2.12.2
Same issue here
same issue! In iOS seens normal, but I had this problem in Android.
I solved it using flutter channel beta, so we will wait for the next stable release
I solved it using flutter channel beta, so we will wait for the next stable release
Which version of the beta channel is that?
I solved it using flutter channel beta, so we will wait for the next stable release
Which version of the beta channel is that?
I'm now back to the latest stable version 2.0.6 and the problem seems to be solved with the latest update
Which version of the package are you using ? (using flutter 2.0.6 and package version ^2.0.0-nullsafety.2 and still having this bug)
also having this issue with Flutter 2.0.6 and package version ^2.0.0-nullsafety.2
Same issue.
I'm using this mask:
MaskTextInputFormatter(mask: '(##) ###-##-##', filter: {"#": RegExp(r'[0-9]')})
Backspace removes not correctly. But, when I change keyboardType of TextField from TextInputType.number to TextInputType.text, so it works correctly. Any idea how to fix?
Fix https://github.com/siqwin/mask_text_input_formatter/pull/55/commits/8f7b40a41772079d34228b90fa36007f72a327cb