Skip to content

[iOS]When the keyboard type of the TextField is set to "numer", there is an issue of repeated characters with certain IME. #133424

Closed
flutter-team-archive/engine
#45657

Description

@abgne

Is there an existing issue for this?

Steps to reproduce

  1. Use the sample program I've provided.
  2. Add the Japanese IME to the keyboard on the actual iPad device.(Chinese, Traditional - Zhuyin has the same issue)
  3. Execute the sample program on the actual iPad device.
  4. Ensure the input box remains blank.
  5. Switch to the Japanese input method.
  6. Try pressing only the number key "1".

Expected results

I expect only a single "1".

Actual results

However, in addition to the number key "1" that we pressed, an additional "1" will automatically appear.

Code sample

Code sample

main.dart

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.amber,
          title: const Text('Flutter Demo'),
        ),
        body: const Padding(
          padding: EdgeInsets.all(8.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Text('keyboardType: TextInputType.number'),
              TextField(
                keyboardType: TextInputType.number, // the same: TextInputType.phone
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

The issue occurs only on the actual iPad device; the simulator works normally.

RPReplay_Final1693185994.MP4

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[!] Flutter (Channel stable, 3.13.1, on macOS 13.1 22C65 darwin-x64, locale zh-Hant-TW)
    • Flutter version 3.13.1 on channel stable at /Users/user/Development/flutter
    ! Warning: `dart` on your path resolves to /usr/local/Cellar/dart/3.1.0/libexec/bin/dart, which is not inside your current Flutter SDK checkout at
      /Users/user/Development/flutter. Consider adding /Users/user/Development/flutter/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e1e47221e8 (5 天前), 2023-08-22 21:43:18 -0700
    • Engine revision b20183e040
    • Dart version 3.1.0
    • DevTools version 2.25.0
    • Pub download mirror https://pub.dev
    • Flutter download mirror https://storage.googleapis.com
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/user/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Users/user/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9862592/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Android Studio (version 2022.2)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (3 available)
    • iPad Pro (mobile)       • 00008020-000658D602F9002E            • ios            • iOS 16.2 20C65
    • macOS (desktop)              • macos                                • darwin-x64     • macOS 13.1 22C65 darwin-x64
    • Chrome (web)                 • chrome                               • web-javascript • Google Chrome 116.0.5845.110

[✓] Network resources
    • All expected network resources are available.

Activity

  1. added
    in triagePresently being triaged by the triage team
    on Aug 28, 2023
  2. huycozy commented on Aug 28, 2023

    @huycozy
    Member

    Hi @abgne
    I don't have a physical iPad to check this (it seems the issue is only reproducible on iPad with that keyboard layout). It doesn't happen on an emulator/simulator as you stated.

    Could you please confirm this issue is only reproduced with number/phone keyboard type? It doesn't occur with another type (text/url/..), right?

    Also, please switch to master channel and confirm if this issue still persists. Thank you!

  3. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 28, 2023
  4. abgne commented on Aug 29, 2023

    @abgne
    Author

    Hi @huycozy

    Thank you for your response!

    When the keyboard type is set to 'number', only the numeric keypad appears on the phone and cannot be switched. However, this is not the case on the Pad. Moreover, I don't have any physical Android Pad, so I'm uncertain whether this issue exists on Android Pad.

    Testing on iPhone

    The test shown in the image below was conducted on my actual iPhone device.

    IMG_9185

    After switching to the main branch, the issue still persists.

    [!] Flutter (Channel master, 3.14.0-12.0.pre.72, on macOS 13.1 22C65 darwin-x64, locale zh-Hant-TW)
        • Flutter version 3.14.0-12.0.pre.72 on channel master at /Users/user/Development/flutter
        ! Warning: `dart` on your path resolves to /usr/local/Cellar/dart/3.1.0/libexec/bin/dart, which is not inside your current Flutter SDK checkout at
          /Users/user/Development/flutter. Consider adding /Users/user/Development/flutter/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 42e2f4fb3e (53 分鐘前), 2023-08-28 19:43:58 -0400
        • Engine revision bd2132a081
        • Dart version 3.2.0 (build 3.2.0-114.0.dev)
        • DevTools version 2.26.2
        • Pub download mirror https://pub.dev
        • Flutter download mirror https://storage.googleapis.com
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    (base) ➜  input_bug flutter --version
    Flutter 3.14.0-12.0.pre.72 • channel master • https://github.com/flutter/flutter.git
    Framework • revision 42e2f4fb3e (2 小時前) • 2023-08-28 19:43:58 -0400
    Engine • revision bd2132a081
    Tools • Dart 3.2.0 (build 3.2.0-114.0.dev) • DevTools 2.26.2

    The APP shown in the following video was tested using the master version.

    3.14.0-12.0.pre.72.MP4

    I've tested all 11 types of TextInputType. Only number/phone have issues, mainly because they switch to the numeric keypad (when toggling within the last used IME).

    Test video for the 11 types.
    TextInputType.MP4

    I've tested and found it working correctly in version 3.7.x. However, subsequent versions from 3.10.x to the latest have issues.

    If there are any tests that can help you pinpoint the issue, please let me know!

  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 29, 2023
  6. huycozy commented on Aug 29, 2023

    @huycozy
    Member

    Thanks for the detailed tests.

    I also checked this on Android tablet emulator and other platforms (macOS, web) but can't see the issue. It also can't reproduce on an Android physical phone (since the keyboard layout can't be changed for language; same to iPhone)

    Labeling this as an iOS platform-specific issue. If anyone facing this issue can reproduce it on an Android physical tablet, please write in the comments. Thanks!

  7. added
    a: text inputEntering text in a text field or keyboard related problems
    platform-iosiOS applications specifically
    frameworkflutter/packages/flutter repository. See also f: labels.
    engineflutter/engine related. See also e: labels.
    a: tabletTablets and landscape phones
    a: internationalizationSupporting other languages or locales. (aka i18n)
    team-iosOwned by iOS platform team
    and removed
    in triagePresently being triaged by the triage team
    on Aug 29, 2023
  8. 7 remaining items

  9. flutter-triage-bot commented on Sep 8, 2023

    @flutter-triage-bot

    Issue is assigned to multiple teams (design, ios). Please ensure the issue has only one team-* label at a time. Use fyi-* labels to have another team look at the issue without reassigning it.

  10. LongCatIsLooong commented on Sep 10, 2023

    @LongCatIsLooong
    Contributor

    This is reproducible on simulators. The iPad system Japanese keyboard is a bit different from that on iPhones and so far I'm not able to reproduce the issue on an iPhone.

  11. added
    P1High-priority issues at the top of the work list
    and removed
    P2Important issues not at the top of the work list
    on Sep 10, 2023
  12. added
    r: fixedIssue is closed as already fixed in a newer version
    on Sep 19, 2023
  13. github-actions commented on Oct 3, 2023

    @github-actions

    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.

  14. locked as resolved and limited conversation to collaborators on Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P1High-priority issues at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)a: tabletTablets and landscape phonesa: text inputEntering text in a text field or keyboard related problemsc: regressionIt was better in the past than it is nowengineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions