Skip to content

[material_ui] Fix DropdownMenu losing text cursor when re-enabled - #13179

Merged
auto-submit[bot] merged 5 commits into
flutter:mainfrom
Mairramer:fix-dropdown-menu-cursor
Nov 7, 2026
Merged

auto-submit[bot] merged 5 commits into
flutter:mainfrom
Mairramer:fix-dropdown-menu-cursor

Conversation

@Mairramer

Copy link
Copy Markdown
Contributor

Fixes flutter/flutter#152478

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Oct 9, 2026
@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Oct 9, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request addresses an issue where the DropdownMenu text cursor is lost when the widget is disabled and re-enabled by caching the focusNode.canRequestFocus state. It also adds a corresponding widget test and a changelog entry. Review feedback suggests combining the conditional blocks in didUpdateWidget to avoid duplicate assignments and disposing of the manually created FocusNode in the test using addTearDown to prevent memory leaks.

@Mairramer
Mairramer force-pushed the fix-dropdown-menu-cursor branch from edbcb97 to df98f87 Compare October 9, 2026 13:08
@Mairramer
Mairramer force-pushed the fix-dropdown-menu-cursor branch from df98f87 to 489dbf6 Compare October 9, 2026 13:09
@Piinks
Piinks requested review from QuncCccccc and elliette October 20, 2026 21:21
@Mairramer
Mairramer requested a review from elliette October 23, 2026 14:41

@elliette elliette left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you, LGTM!

@Mairramer Mairramer added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 7, 2026
@auto-submit
auto-submit Bot merged commit fb8fad4 into flutter:main Nov 7, 2026
13 checks passed
definev pushed a commit to definev/flutter that referenced this pull request Nov 9, 2026
…6210)

flutter/packages@63881f9...565c657

2026-11-08 [email protected] Roll Flutter from
e36b370 to acade0f (1 revision) (flutter/packages#13590)
2026-11-07 [email protected] [material_ui] Fix
DropdownMenu losing text cursor when re-enabled (flutter/packages#13179)
2026-11-07 [email protected] Roll Flutter from
09175cd to e36b370 (22 revisions) (flutter/packages#13586)
2026-11-07 [email protected] [material_ui]
Add Material motion springs (flutter/packages#13338)
2026-11-06 [email protected] [material_ui] Paint
the active RoundedRectSliderTrackShape segment on top in RTL
(flutter/packages#13225)
2026-11-06 [email protected] [pigeon] Replace Experimental with
Preview (flutter/packages#13579)
2026-11-06 [email protected] [material_ui] Fix minimum width
for Material 3 primary tab indicator (flutter/packages#13322)
2026-11-06 [email protected]
[material_ui] Dispose drag-end CurvedAnimation in modal bottom sheet
(flutter/packages#13167)
2026-11-06 [email protected] [camera_web] Re: Support for camera
stream on web (flutter/packages#7950)
2026-11-06 [email protected] Roll Flutter from
3623d2d to 09175cd (61 revisions) (flutter/packages#13578)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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 CICD Run CI/CD p: material_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DropdownMenu] providing a focusNode, the text cursor is lost after disabling the widget and enabling it again

2 participants