Skip to content

Flutter web TextField with keyboardType=phone opens alpha-numeric keyboard on Android Firefox #136351

@dioseltorre

Description

@dioseltorre

Is there an existing issue for this?

Steps to reproduce

  1. Run sample code on web-server and canvaskit renderer
  2. flutter run -d web-server --web-renderer canvaskit --web-hostname 0.0.0.0 --web-port 8989
  3. Open the app on Android Firefox browser using IP and port 8989
  4. Tap on the text field

Expected results

Should open the phone keypad.
When using normal html <input type="tel" id="phone" /> element, the phone keypad is opened as expected on the same Android Firefox browser.

Actual results

It opens the alpha-numeric keyboard.

Code sample

Code sample
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: MyWidget(),
        ),
      ),
    );
  }
}

class MyWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.all(24),
      child: TextField(
        keyboardType: TextInputType.phone,
        onChanged: (value) {},
        decoration: const InputDecoration(
          hintText: 'Phone Number',
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

Screenshot_20231011-192034

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[√] Flutter (Channel stable, 3.13.0, on Microsoft Windows [Version 10.0.22621.2283], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[!] Visual Studio - develop Windows apps (Visual Studio Build Tools 2017 15.9.9)
    X Visual Studio 2019 or later is required.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2022.1)
[!] Android Studio (version 4.1)
    X Unable to determine bundled Java version.
[√] VS Code (version 1.83.0)
[√] Connected device (3 available)
[√] Network resources

! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsbrowser: firefoxonly manifests in Firefoxengineflutter/engine related. See also e: labels.found in release: 3.13Found to occur in 3.13found in release: 3.16Found to occur in 3.16has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-webOwned by Web platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions