Repository navigation
Open
Labels
P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsa: tvIssues on TV platformse: device-specificOnly manifests on certain devicesfound in release: 3.19Found to occur in 3.19found in release: 3.22Found to occur in 3.22has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyteam-text-inputOwned by Text Input teamtriaged-text-inputTriaged by Text Input team
Description
Steps to reproduce
- create a new flutter project with
flutter create test_drive - add a couple of TextFields
flutter runon Android TV device- select the text field
- press the back button to close the keyboard
- use the D-pad to change focus to another TextField/Widget
Expected results
The D-pad navigation is working and the next widget/text field is focused
Actual results
The use of the d-pad doesn't result in any action. Navigation is broken
Code sample
Code sample
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
const TextField(),
TextField(
decoration: InputDecoration(
filled: true,
suffixIcon: IconButton(
icon: const Icon(
Icons.visibility,
),
onPressed: () {},
),
),
),
],
),Screenshots or Video
Screenshots / Video demonstration
In the video can be seen the difference between <Tab> navigation on an emulated phone and the broken D-pad navigation on an emulated TV
Desktop.2024.05.03.-.09.55.11.02.mp4
Logs
Logs
No relevant log
Flutter Doctor output
Doctor output
[✓] Flutter (Channel master, 3.22.0-23.0.pre.17, on Microsoft Windows [Version 10.0.22631.3447], locale it-IT)
• Flutter version 3.22.0-23.0.pre.17 on channel master at D:\Dev\Flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 183bc15816 (6 hours ago), 2024-05-02 23:09:03 -0700
• Engine revision d8c8cf4384
• Dart version 3.5.0 (build 3.5.0-127.0.dev)
• DevTools version 2.35.0
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at D:\Dev\AndroidSDK
• Platform android-34, build-tools 34.0.0
• Java binary at: S:\Program Files\JetBrains\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[✗] Visual Studio - develop Windows apps
✗ Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[✓] Android Studio (version 2023.2)
• Android Studio at S:\Program Files\JetBrains\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 17.0.9+0--11185874)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.1)
• IntelliJ at S:\Program Files\JetBrains\IntelliJ IDEA Ultimate
• Flutter plugin version 79.0.3
• Dart plugin version 241.15845
[✓] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.3447]
• Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.119
• Edge (web) • edge • web-javascript • Microsoft Edge 123.0.2420.65
[✓] Network resources
• All expected network resources are available.Reacted by hansolowireless, François PERROCHON, mx1up and Aleteoryx
Reacted by hansolowireless
Reacted by hansolowireless and zhuhaichao518
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsa: tvIssues on TV platformse: device-specificOnly manifests on certain devicesfound in release: 3.19Found to occur in 3.19found in release: 3.22Found to occur in 3.22has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyteam-text-inputOwned by Text Input teamtriaged-text-inputTriaged by Text Input team
Activity
darshankawar commentedon May 3, 2024
Thanks for the report @AlexDicy
Can you take a look at https://api.flutter.dev/flutter/widgets/MediaQueryData/navigationMode.html specially for DPAD navigation and check if using NavigationMode.directional as mentioned in it, helps in your case or not ?
AlexDicy commentedon May 3, 2024
Hello @darshankawar, I wrapped the whole widget with
MediaQuerylike this (I also tried wrapping just the column):The behavior is the same: clicking the central button doesn't re-open the keyboard, clicking the directional buttons don't change the focus.
darshankawar commentedon May 6, 2024
Thanks for the update. I was able to replicate the reported behavior using Android TV emulator.
stable, master flutter doctor -v
justinmc commentedon May 9, 2024
@gspencergoog Looks like you added navigationMode years ago, do you know if it should handle TV remote input like this? I'm not aware of ever doing anything to support this kind of thing in our text fields, not sure if it has ever been supported or not.
gspencergoog commentedon May 10, 2024
That was the original intent, and it does affect the way text fields accept focus, etc. For instance,
TextFieldwill accept focus even when it is disabled when in directional navigation mode.It only handles TV remote input that emits directional arrows for the DPAD directions though (like Android TV does). Perhaps something has broken this functionality, though.
zhuhaichao518 commentedon Jul 22, 2025
I have exactly the same problem. Any update on this? Is there a workaround for this problem?
zhuhaichao518 commentedon Jul 25, 2025
I have created a plugin hosting an native android textfiled as a workaround. native_textfield_tv
hasanm08 commentedon Jul 3, 2026
recently I created new package to fix this on both Android TVs and Apple TVs
you can use it
https://pub.dev/packages/tv_textfield
@AlexDicy