-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
TextInputType.number deletes 2 chars at once when hitting delete #70744
Comments
Reproducible on The issue is reproducible with:
Or basically any This is similar but different from #70581 because #70581 reproduces with Chinese characters only and with a text field without Related to #67898. Adding crowd because it impact lots of users. flutter doctor -v
|
/cc @gspencergoog Didn't you recently talk about us deleting in two different places? Could this be related? Also /cc @LongCatIsLooong @justinmc, who I think landed some changes in this area recently. |
Yes, I think it is related. I'll take this one. |
Cc @pcsosinski |
I was able to see that what I suspected is true (we are handling the delete key twice now, once in the engine, once in the framework), but in fixing this, I uncovered some other race condition issues that I've been working on today. I think can create a PR for fixing this problem, and a new bug for the race condition. |
I Love you people ❤️ I have been trying to figure out why this was happening to me for the past 2 hours! |
@pedromassangocode, @gspencergoog I have replicated a similar problem in the current flutter beta version (1.24.0-10.2.pre) Same problem of deleting two characters at the same time When an user types a combination of letters and numbers and then proceeds to press the delete key everything works as expected. The problem occurs when the user writes something that starts with a number and ends with a number. This doesn't affect the web build. Using the same code as the issue but without keyboardType : import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Test test test'),
),
body: TextFormField());
}
}
|
Hi all, |
same issue with the dev version Flutter 1.24.0-10.2.pre • channel dev • https://github.com/flutter/flutter.git It deletes 2 chars from the text field with InputType text as well. |
Thanks!! |
This comment was marked as abuse.
This comment was marked as abuse.
Why is this closed? Is it fixed? I am on beta and still facing this issue. |
It was closed because it has been fixed on master. Changes on master will propagate to other branches as they proceed through the release process. See https://github.com/flutter/flutter/wiki/Flutter-build-release-channels |
FYI b4d4e30 will require a manual merge into flutter-1.22-candidate.12 cc @christopherfujino @gspencergoog |
removing cp label as this was not affecting 1.22. |
same issue at 1.24.0-10.2.pre • channel beta |
This error also occurs for TextInputType.emailAddress |
@jackgitsource Do you see this issue on master? |
@justinmc No, but beta version 1.25.0-8.2 solved it |
Yeah. In beta version 1.25.0-8.2 solved it. |
Is this issue fixed on master now? |
I am still getting this issue on Android. (stable 2.0.0) |
@Qwampa I'm unable to reproduce this on stable 2.0.0. If this is still happening for you, please file a new issue with all the relevant information (output of |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Internal: b/173579423
Steps to Reproduce
flutter create bug
.flutter run
Expected results:
It should only delete one char at a time.
Actual results:
It deletes 2 chars at a time.
Logs
https://gist.github.com/joachimvalente/df23aef38b4db835d132544081f6e905
The text was updated successfully, but these errors were encountered: