flutter / flutter/flutter

Tab key inserts space instead of changing focus on iOS app running on macOS (Apple Silicon)

Open
#172,635 5 comments 0 reactions 0 assignees View on GitHub
a: text input e: device-specific e: OS-version specific f: focus found in release: 3.32 found in release: 3.33 has reproducible steps p: material_ui P3 package platform-macos platform-target-arm team-text-input triaged-text-input
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

1. Install the iOS version of the app (via TestFlight or AppStore) on a Mac with Apple Silicon.
2. Focus on a TextFormField.
3. Press the Tab key.

### Expected results

Focus should move to the next focusable field.

### Actual results

A space character is inserted in the field instead.

### Code sample

Code sample

```dart
import 'package:flutter/material.dart';

/// Flutter code sample for [Form].

void main() => runApp(const FormExampleApp());

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

@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(appBar: AppBar(title: const Text('Form Sample')), body: const FormExample()),
);
}
}

class FormExample extends StatefulWidget {
const FormExample({super.key});

@override
State createState() => _FormExampleState();
}

class _FormExampleState extends State {
final GlobalKey _formKey = GlobalKey();

@override
Widget build(BuildContext context) {
return Form(
key: _formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextFormField(
decoration: const InputDecoration(hintText: 'Enter your email'),
validator: (String? value) {
if (value == null || value.isEmpty) {
return 'Please enter some text';
}
return null;
},
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0),
child: ElevatedButton(
onPressed: () {
// Validate will return true if the form is valid, or false if
// the form is invalid.
if (_formKey.currentState!.validate()) {
// Process data.
}
},
child: const Text('Submit'),
),
),
],
),
);
}
}
```

### Logs

_No response_

### Flutter Doctor output

Doctor output

```console
Flutter (Channel stable, 3.32.5, on macOS 15.5 24F74 darwin-arm64, locale it-IT) [408ms]
• Flutter version 3.32.5 on channel stable at /Users/michela/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fcf2c11572 (4 weeks ago), 2025-06-24 11:44:07 -0700
• Engine revision dd93de6fb1
• Dart version 3.8.1
• DevTools version 2.45.1

[!] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [420ms]
• Android SDK at /Users/me/Library/Android/sdk
✗ cmdline-tools component is missing.
Try installing or updating Android Studio.
Alternatively, download the tools from https://developer.android.com/studio#command-line-tools-only and make sure to set the ANDROID_HOME environment variable.
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/to/macos-android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 16.4) [857ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16F6
• CocoaPods version 1.16.2

[✓] Chrome - develop for the web [10ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2025.1) [9ms]
• Android Studio at /Applications/Android Studio.app/Contents
• 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 21.0.6+-13391695-b895.109)

[✓] VS Code (version 1.102.1) [9ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.114.0

[✓] Connected device (3 available) [5,9s]
• iPad di me (wireless) (mobile) • 56f0314db7c04f1eb3dfd58d7903870c637aa3a5 • ios • iOS 17.7.8 21H440
• macOS (desktop) • macos • darwin-arm64 • macOS 15.5 24F74 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 138.0.7204.168

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.