Skip to content

Conversation

@huycozy
Copy link
Member

@huycozy huycozy commented Nov 21, 2025

Demo (after the fix)
Screen.Recording.2025-11-21.at.16.06.00.mov

Pre-launch 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.

@huycozy huycozy self-assigned this Nov 21, 2025
@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Nov 21, 2025
@huycozy huycozy requested a review from QuncCccccc November 21, 2025 10:25
@huycozy huycozy marked this pull request as ready for review November 21, 2025 10:25
@huycozy huycozy requested a review from dkwingsmt November 21, 2025 10:26
@huycozy huycozy force-pushed the fix-SearchAnchor.bar-onSubmit-does-not-lose-focus-178719 branch from 72184c9 to 919d18b Compare November 21, 2025 10:34
Copy link
Contributor

@QuncCccccc QuncCccccc left a comment

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. I also checked some real app like Google maps, it seems when the search view is closed by typing "done", the search bar lose focus. So this behavior matches the native behavior.

@huycozy huycozy added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 2, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Dec 2, 2025
@auto-submit
Copy link
Contributor

auto-submit bot commented Dec 2, 2025

autosubmit label was removed for flutter/flutter/178910, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR.

@huycozy huycozy removed the request for review from dkwingsmt December 2, 2025 08:12
@huycozy huycozy force-pushed the fix-SearchAnchor.bar-onSubmit-does-not-lose-focus-178719 branch from 919d18b to a2d0514 Compare December 2, 2025 08:15
@huycozy huycozy force-pushed the fix-SearchAnchor.bar-onSubmit-does-not-lose-focus-178719 branch from a2d0514 to 8068112 Compare December 2, 2025 08:41
@huycozy huycozy added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 2, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Dec 2, 2025
Merged via the queue into flutter:master with commit 14063cf Dec 2, 2025
71 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Dec 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 2, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 2, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Dec 2, 2025
flutter/flutter@05d6005...5545bb3

2025-12-02 [email protected] Roll Skia from 4371ed0ce49e to 45337c4e919d (1 revision) (flutter/flutter#179342)
2025-12-02 [email protected] Roll Fuchsia Linux SDK from sTk6OB7a4yudbfdZg... to l0DvmZrMHlF12frrX... (flutter/flutter#179338)
2025-12-02 [email protected] Unfocus search anchor bar when the view is closed (flutter/flutter#178910)
2025-12-02 [email protected] Directly generate a Mach-O dynamic library using gen_snapshot. [reland] (flutter/flutter#174870)
2025-12-02 [email protected] Roll Skia from 1fc59bf5cbb1 to 4371ed0ce49e (3 revisions) (flutter/flutter#179326)
2025-12-02 [email protected] [win32] Replace threadpool timer with custom background thread timer (flutter/flutter#179249)
2025-12-02 [email protected] Roll Skia from 61257a1036fb to 1fc59bf5cbb1 (1 revision) (flutter/flutter#179321)
2025-12-02 [email protected] Roll Skia from ef52cf952211 to 61257a1036fb (2 revisions) (flutter/flutter#179319)
2025-12-02 [email protected] Roll Skia from 8887653a773e to ef52cf952211 (1 revision) (flutter/flutter#179316)
2025-12-02 [email protected] Roll pub packages (flutter/flutter#179313)
2025-12-02 [email protected] Update customer tests (flutter/flutter#179309)
2025-12-01 [email protected] Marks Linux_pixel_7pro new_gallery__transition_perf to be unflaky (flutter/flutter#176339)
2025-12-01 [email protected] Fix typo (flutter/flutter#179200)
2025-12-01 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 5.0.1 to 6.0.0 in the all-github-actions group (flutter/flutter#179308)
2025-12-01 [email protected] Roll Dart SDK from c54108eeb2c1 to eb743a1d4ade (1 revision) (flutter/flutter#179304)
2025-12-01 [email protected] Roll pub packages (flutter/flutter#179280)
2025-12-01 [email protected] Roll Skia from 68cc3257e734 to 8887653a773e (4 revisions) (flutter/flutter#179302)
2025-12-01 [email protected] Support round caps for the fast arc stroke generator (flutter/flutter#178269)
2025-12-01 [email protected] Fix for PR #174374 - Fix - TalkBack does not announce list information (flutter/flutter#177622)
2025-12-01 [email protected] Small cleanup in `‎AccessibilityBridge.java‎` (flutter/flutter#179226)
2025-12-01 [email protected] Roll Skia from 925c311f4b37 to 68cc3257e734 (44 revisions) (flutter/flutter#179294)
2025-12-01 [email protected] [ Widget Preview ] Ignore changes under `ios/.symlinks` (flutter/flutter#179290)
2025-12-01 [email protected] Delete unecessary lockfile (flutter/flutter#179052)
2025-12-01 [email protected] Resolving and piping the view ID  through the WidgetController and the TestPointer so that clicks wind up on the right view (flutter/flutter#178941)
2025-12-01 [email protected] Fix link specified as plain text `FlutterApplication.java‎` (flutter/flutter#178573)
2025-12-01 [email protected] Update some comments to reflect theme normalization (flutter/flutter#179013)
2025-12-01 [email protected] Roll Dart SDK from 51fe8cd01fbe to c54108eeb2c1 (1 revision) (flutter/flutter#179267)
2025-12-01 [email protected] Explicitly use FreeType font scanner with Fuchsia (flutter/flutter#179055)

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

To file a bug in Packages: 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
mboetger pushed a commit to mboetger/flutter that referenced this pull request Dec 2, 2025
- Fix flutter#178719
- See
flutter#178719 (comment)
for details of debugging and proposal.

<details open>
<summary>Demo (after the fix)</summary>


https://github.com/user-attachments/assets/cecb470f-d98c-47b0-a34d-fc858cfb0dd4
</details>


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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](https://developers.google.com/gemini-code-assist/docs/review-github-code).
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.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

Signed-off-by: huycozy <[email protected]>
@huycozy huycozy deleted the fix-SearchAnchor.bar-onSubmit-does-not-lose-focus-178719 branch December 3, 2025 05:14
reidbaker pushed a commit to AbdeMohlbi/flutter that referenced this pull request Dec 10, 2025
- Fix flutter#178719
- See
flutter#178719 (comment)
for details of debugging and proposal.

<details open>
<summary>Demo (after the fix)</summary>


https://github.com/user-attachments/assets/cecb470f-d98c-47b0-a34d-fc858cfb0dd4
</details>


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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](https://developers.google.com/gemini-code-assist/docs/review-github-code).
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.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

Signed-off-by: huycozy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SearchAnchor.bar, onSubmit, doesn't lose focus, leading to a unintended .pop

2 participants