Skip to content

Fix DropdownMenu can be focused and updated when disabled - #149737

Merged
auto-submit[bot] merged 1 commit into
flutter:masterfrom
NevercodeHQ:fix_dropdown_menu_can_be_focused_and_updated_when_disabled
Jun 12, 2024
Merged

auto-submit[bot] merged 1 commit into
flutter:masterfrom
NevercodeHQ:fix_dropdown_menu_can_be_focused_and_updated_when_disabled

Conversation

@bleroux

@bleroux bleroux commented Jun 5, 2024

Copy link
Copy Markdown
Contributor

Description

This PRs fixes DropdownMenu behaviors when disabled.

Before this PR the DropdownMenu value can be changed when DropdownMenu.enabled was false because the inner IconButton was not disabled so it can get focus (for instance using tab key).

After this PR, the inner TextField and the inner IconButton are disabled when DropdownMenu.enabled is false.

Related Issue

Fixes #149598.

Tests

Updates 1 test.
Adds 1 test.

@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages labels Jun 5, 2024
@Piinks
Piinks requested a review from QuncCccccc June 5, 2024 18:16
@bleroux
bleroux force-pushed the fix_dropdown_menu_can_be_focused_and_updated_when_disabled branch from b122799 to 23a24f6 Compare June 5, 2024 20:01

@QuncCccccc QuncCccccc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM:) Thanks for the fix!

@QuncCccccc QuncCccccc added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 11, 2024
@bleroux bleroux removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 11, 2024
@bleroux

bleroux commented Jun 11, 2024

Copy link
Copy Markdown
Contributor Author

I removed the autosubmit label because many recent PRs were reverted due to #149851.
I will add again the autosubmit label once #149851 is fixed.

@bleroux
bleroux force-pushed the fix_dropdown_menu_can_be_focused_and_updated_when_disabled branch from 23a24f6 to abbd4c5 Compare June 12, 2024 06:00
@bleroux bleroux added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 12, 2024
@auto-submit
auto-submit Bot merged commit fdb74fd into flutter:master Jun 12, 2024
@bleroux
bleroux deleted the fix_dropdown_menu_can_be_focused_and_updated_when_disabled branch June 12, 2024 08:47
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 12, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 12, 2024
victorsanni pushed a commit to victorsanni/flutter that referenced this pull request Jun 14, 2024
…9737)

## Description

This PRs fixes `DropdownMenu` behaviors when disabled.

Before this PR the `DropdownMenu` value can be changed when `DropdownMenu.enabled` was false because the inner `IconButton` was not disabled so it can get focus (for instance using tab key).

After this PR, the inner `TextField` and the inner `IconButton` are disabled when `DropdownMenu.enabled` is false.

## Related Issue

Fixes flutter#149598.

## Tests

Updates 1 test.
Adds 1 test.
victorsanni pushed a commit to victorsanni/flutter that referenced this pull request Jun 14, 2024
…9737)

## Description

This PRs fixes `DropdownMenu` behaviors when disabled.

Before this PR the `DropdownMenu` value can be changed when `DropdownMenu.enabled` was false because the inner `IconButton` was not disabled so it can get focus (for instance using tab key).

After this PR, the inner `TextField` and the inner `IconButton` are disabled when `DropdownMenu.enabled` is false.

## Related Issue

Fixes flutter#149598.

## Tests

Updates 1 test.
Adds 1 test.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

disabled DropdownMenu can be changed

2 participants