Repository navigation
disabled DropdownMenu can be changed #149598
Copy link
Copy link
Closed
Labels
a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsfound in release: 3.22Found to occur in 3.22Found to occur in 3.22found in release: 3.23Found to occur in 3.23Found to occur in 3.23frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages team
Description
Steps to reproduce
Press on DPAD "Arrow Down" and then "Select".
Expected results
DropdownMenu is disabled. It should not be possible to change its value. It should not even be focusable.
Actual results
The DropdownMenu is focusable and changeable.
Code sample
Code sample
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(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: const Text('title'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
DropdownMenu<String>(
dropdownMenuEntries: ["foo", "bar"].map((t) => DropdownMenuEntry<String>(label: t, value: t)).toList(),
enabled: false,
),
],
),
),
),
);
}
}
Screenshots or Video
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.1, on Microsoft Windows [Version 10.0.22631.3593], locale de-DE)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop Windows apps (Visual Studio Professional 2022 17.4.3)
[✓] Android Studio (version 2023.3)
[✓] IntelliJ IDEA Community Edition (version 2023.2)
[✓] VS Code (version 1.89.1)
[✓] Connected device (4 available)
[✓] Network resources
• No issues found!Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsfound in release: 3.22Found to occur in 3.22Found to occur in 3.22found in release: 3.23Found to occur in 3.23Found to occur in 3.23frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages team
Type
Projects
- StatusShow more project fieldsDone (PR merged)

Activity
darshankawar commentedon Jun 4, 2024
Thanks for the report @solaristhesun
Are you trying the app in Android TV emulator or any other device ?
solaristhesun commentedon Jun 4, 2024
@darshankawar On Android TV emulator.
darshankawar commentedon Jun 5, 2024
Thanks for the update. I was able to replicate this as shown below:
149598.mov
I also tried with disabled TextField with DPAD, but it works as expected.
stable, master flutter doctor -v
4 remaining items
solaristhesun commentedon Jun 5, 2024
It is also possible to open the menu as shown here:
2024-06-05_10-58-47.mp4
bleroux commentedon Jun 5, 2024
Removing
e:device-specificandplatform-androidlabels because this is also reproducible on desktop (using tab key to set the focus to the icon inside the dropdown menu).[-]disabled DropdownMenu can be changed using DPAD navigation[/-][+]disabled DropdownMenu can be changed[/+]Fix DropdownMenu can be focused and updated when disabled (#149737)
Fix DropdownMenu can be focused and updated when disabled (flutter#14…
Fix DropdownMenu can be focused and updated when disabled (flutter#14…
github-actions commentedon Jun 26, 2024
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 -vand a minimal reproduction of the issue.Fix DropdownMenu can be focused and updated when disabled (#149737)