flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.37k stars 27.55k forks source link

Delete button is not working on first interaction on Samsung Galaxy S7 #82427

Closed vytautas-pranskunas- closed 1 month ago

vytautas-pranskunas- commented 3 years ago

Hello,

I am on latest flutter verion with no issues in flutter doctor.

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.6, on macOS 11.3.1 20E241 darwin-x64, locale en-CH)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.56.0)
[✓] Connected device (2 available)

• No issues found!

After migrating to null safety i noticed that delete button is not working on first interaction with any text field. Once i focus another field and come back to previous one everything works fine. I am attaching video.

this happens only on Samsung S7 device

https://files.fm/f/mzm9p6edm

TahaTesser commented 3 years ago

Hi @vytautas-pranskunas- Have you tested other devices using the same code?

I have a Samsung device, testing on this device has no issue, I can delete the text from the TextField on the first interaction in the first TextField

Reproduced the issue using the following minimal code sample

minimal code sample ```dart import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { final TextEditingController textEditingController = TextEditingController(text: 'Flutter Dart iOS Android'); @override Widget build(BuildContext context) { return MaterialApp( title: 'Material App', home: Scaffold( appBar: AppBar( title: Text('Material App Bar'), ), body: Center( child: Form( child: Column( children: [ TextField( controller: textEditingController, ), TextField(), TextField(), ], ), ), ), ), ); } } ```
Reproduced on the following channel stable

Check flutter doctor -v outputs for each channel below

flutter doctor -v ```console [✓] Flutter (Channel stable, 2.0.6, on Microsoft Windows [Version 10.0.19042.928], locale en-US) • Flutter version 2.0.6 at C:\Users\Taha\Code\flutter_stable • Framework revision 1d9032c7e1 (13 days ago), 2021-04-29 17:37:58 -0700 • Engine revision 05e680e202 • Dart version 2.12.3 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at C:\Users\Taha\Code\SDK • Platform android-30, build-tools 30.0.3 • ANDROID_HOME = C:\Users\Taha\Code\SDK • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174) • All Android licenses accepted. [✓] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.4) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community • Visual Studio Community 2019 version 16.9.31205.134 • Windows 10 SDK version 10.0.19041.0 [✓] Android Studio (version 4.1.0) • Android Studio at C:\Users\Taha\Code\android-studio • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174) [✓] IntelliJ IDEA Community Edition (version 2021.1) • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3 • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart [✓] VS Code (version 1.56.1) • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.22.0 [✓] Connected device (4 available) • SM M025F (mobile) • R9ZR205XX0A • android-arm • Android 10 (API 29) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19042.928] • Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.212 • Edge (web) • edge • web-javascript • Microsoft Edge 90.0.818.56 • No issues found! ```

Please try to reproduce the issue using the minimal code sample above on your device, if the issue doesn't reproduce with this code sample. Can you please provide a complete reproducible minimal code sample Thank you

vytautas-pranskunas- commented 3 years ago

Yes, we test on 5 devices. No other devices has this issue.

chinmaygarde commented 3 years ago

@TahaTesser So, is the issue that this only happens on certain Samsung devices? cc @GaryQian and @blasten for IME Issues. @kf6gpe can help source the specific device.

TahaTesser commented 3 years ago

@chinmaygarde Yes, My Samsung device has no issue (Samsung Galaxy M02s), S7 runs an older Samsung OEM, while newer devices run One UI. I suspect it is related to older OEM on Samsung such as Galaxy S7

kf6gpe commented 3 years ago

OK, I've got one on order; we don't have any in the device library here. @GaryQian or @blasten, are one of you someone who could look at this time permitting? When the handset gets to my place I can ship it to you (arrange the delivery via email).

kf6gpe commented 3 years ago

Self-assigning until the hardware arrives.

vytautas-pranskunas- commented 3 years ago

Hello, what is the progress of thi sissue because i have found that this issue also happens on Xiaomi Mi10 phone This is very ugly issue and i cannot realease an app with it becaus ei do not know how many users it will effect :(

https://user-images.githubusercontent.com/3918999/121550825-5ee02480-ca0f-11eb-933c-4cead4ea8e1c.mp4

p.s. I do not have this issue on Huaway for instance.

p.p.s this applies to all fields where NUMBERS ONLY are mandatory

vytautas-pranskunas- commented 3 years ago

Difference is that is not on first interaction but always... Sometimes it strts to work if i hold on samsung delete for few seconds, but then it stops.

blasten commented 3 years ago

/cc @GaryQian @bparrishMines

This is an example of the behavior that we need to ensure that is e2e tested.

Assigning to Gary. Do you happen to have this device or similar where it repros?

TahaTesser commented 3 years ago

@vytautas-pranskunas- I have a Xiaomi device running MIUI 12, can you please provide a code sample to reproduce? I just tried with a simple number keyboard, delete button works

    body: Center(
        child: TextField(keyboardType: TextInputType.phone,),
      ),
minimal code sample ```dart import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Material App', theme: ThemeData.dark(), home: Home(), ); } } class Home extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Material App Bar'), ), body: Center( child: TextField(keyboardType: TextInputType.phone,), ), floatingActionButton: FloatingActionButton( child: Icon(Icons.add), onPressed: () {}, ), ); } } ```
flutter doctor -v ```console [✓] Flutter (Channel stable, 2.2.1, on Microsoft Windows [Version 10.0.19043.1052], locale en-US) • Flutter version 2.2.1 at C:\Users\Taha\Code\flutter_stable • Framework revision 02c026b03c (2 weeks ago), 2021-05-27 12:24:44 -0700 • Engine revision 0fdb562ac8 • Dart version 2.13.1 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at C:\Users\Taha\Code\SDK • Platform android-30, build-tools 30.0.3 • ANDROID_SDK_ROOT = C:\Users\Taha\Code\SDK • Java binary at: C:\Users\Taha\Code\openjdk\bin\java.exe • Java version OpenJDK Runtime Environment (build 1.8.0-262-b10) • All Android licenses accepted. [✓] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.10.0) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community • Visual Studio Community 2019 version 16.10.31321.278 • Windows 10 SDK version 10.0.19041.0 [!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions). [✓] IntelliJ IDEA Community Edition (version 2021.1) • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.1 • Flutter plugin version 57.0.5 • Dart plugin version 211.7233 [✓] VS Code (version 1.57.0) • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.23.0 [✓] Connected device (4 available) • Redmi K20 Pro (mobile) • def0ad20 • android-arm64 • Android 10 (API 29) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19043.1052] • Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.101 • Edge (web) • edge • web-javascript • Microsoft Edge 91.0.864.41 ! Doctor found issues in 1 category. ```
vytautas-pranskunas- commented 3 years ago

Thats a thing weired things are happening: 1) When connecting phone to debug mode - all works 2) When deployed PROD build to phone - all works 3) When installed from app - does not work

Tried 3 times with 3 different deploys.

Any thoghts?

vytautas-pranskunas- commented 3 years ago

and is all around application.. no number fields can be deleted on Xiaomi MI10 or Samsung Galaxy S7

Applies to: TextInputType.number TextInputType.phone

on Samsung when you go to prev screen and come back delete starts to work. On Xiaomi - not.

Also we noticed that sometimes it starts to work but out of the sudden stops. There is some magical bug :(

vytautas-pranskunas- commented 3 years ago

I have even more weired scenario that QA have found. in short: phone number cannot be deleted untill she deletes another field which is number type. After she comes back to phone number deltetion works. This is not working when she tries to delete value from any other field. This has started with flutter 2.x because on 1.7x we did not have such issues

https://user-images.githubusercontent.com/3918999/121737024-9e367000-caf8-11eb-9b3e-eb04e1f04abb.mp4

vytautas-pranskunas- commented 3 years ago

Hi,

latest update: after more testing we discovered that fields with typekeyboardType: TextInputType.number, acts strange: Cannot delete field 1 but if field 2 changed that for short amount of time field 1 also works.

https://user-images.githubusercontent.com/3918999/121777450-71369b80-cb92-11eb-9def-1eb181fe70b9.mp4

vytautas-pranskunas- commented 2 years ago

Any progress on this one?

vytautas-pranskunas- commented 2 years ago

any progress on this?

reidbaker commented 1 year ago

Gary is no longer working on flutter issues. Removing him to correctly reflect bug status.

flutter-triage-bot[bot] commented 1 year ago

This issue is assigned but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

flutter-triage-bot[bot] commented 11 months ago

This issue is assigned to @kf6gpe but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

flutter-triage-bot[bot] commented 9 months ago

This issue was assigned to @kf6gpe but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.

darshankawar commented 2 months ago

@vytautas-pranskunas- Revisiting this issue, I tried sample code with 2 TextFields, one with phone and other with number and tried deleting the numbers back and forth which worked properly as shown below. I used S10+ device (Android 12) running on latest stable version.

https://github.com/user-attachments/assets/ae0ae39c-edb6-4c96-9c04-9061a8ab56d1

Please try at your end if the reported behavior still persists or not with latest stable version.

github-actions[bot] commented 1 month ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

github-actions[bot] commented 3 weeks ago

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 flutter doctor -v and a minimal reproduction of the issue.