Skip to content

Conversation

@koji-1009
Copy link
Contributor

@koji-1009 koji-1009 commented Dec 20, 2024

Original PR flutter/engine#57209


The removeFromSuperview in the hideTextInput method was triggering the save password, so I changed it to cleanUpViewHierarchy.

fix #145681

sample app code

https://github.com/koji-1009/autofill_cancel_issue

before

before.mp4

after

after.mp4

Pre-launch Checklist

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

@github-actions github-actions bot added the engine flutter/engine related. See also e: labels. label Dec 20, 2024
@koji-1009 koji-1009 changed the title fix: Fix view removal process for AutofillContextAction.cancel [iOS][Engine] Fix view removal process for AutofillContextAction.cancel Dec 20, 2024
@koji-1009 koji-1009 force-pushed the fix/ios_autofill_password branch from da50aad to 87f5ba2 Compare January 5, 2025 13:52
@chinmaygarde
Copy link
Member

cc @cbracken. You had approved it in the old repo. Can you do the same here so we may land it?

@chinmaygarde
Copy link
Member

cc @jmagman. I believe this just needs a stamp.

Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

Apologies for the delay on this. Stamping LGTM based on approval from flutter/engine#57209

@jmagman
Copy link
Member

jmagman commented Feb 10, 2025

@cbracken can you give the second required review?

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

LGTM stamp from a Japanese personal seal

Thank you for resubmitting to the new repo!

@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 10, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Feb 10, 2025
Merged via the queue into flutter:master with commit 5e37c96 Feb 10, 2025
178 of 179 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 10, 2025
@koji-1009 koji-1009 deleted the fix/ios_autofill_password branch February 10, 2025 23:41
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 17, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 17, 2025
Roll Flutter from 892f9c1 to e8f34a9 (71 revisions)

flutter/flutter@892f9c1...e8f34a9

2025-02-12 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Skia from f31c733c86c4 to 25937c31f153 (2 revisions) (#163127)" (flutter/flutter#163133)
2025-02-12 [email protected] Roll Skia from f31c733c86c4 to 25937c31f153 (2 revisions) (flutter/flutter#163127)
2025-02-12 [email protected] Update .ci.yaml to support Fuchsia cherrypick branches (flutter/flutter#163000)
2025-02-12 [email protected] Roll Skia from 6f17f2ebb2e5 to f31c733c86c4 (1 revision) (flutter/flutter#163112)
2025-02-12 [email protected] Roll Skia from a9dbb2479c26 to 6f17f2ebb2e5 (2 revisions) (flutter/flutter#163109)
2025-02-12 [email protected] [devicelab] dont strip symbols in platform views layout test. (flutter/flutter#163101)
2025-02-12 [email protected] [Impeller] mirror tile mode requires highp for Adreno. (flutter/flutter#163066)
2025-02-12 [email protected] Roll Skia from 5b56d9a91633 to a9dbb2479c26 (6 revisions) (flutter/flutter#163100)
2025-02-12 [email protected] Roll Dart SDK from d9d7f103b6b7 to fcef25f18e4d (3 revisions) (flutter/flutter#163098)
2025-02-12 [email protected] Generate a correct `.flutter-plugin-dependencies` file for iOS/macOS projects (flutter/flutter#162834)
2025-02-12 [email protected] Remove unsound artifacts, remove `*Sound` qualifier. (flutter/flutter#163015)
2025-02-12 [email protected] [Impeller] libImpeller: Add support for Metal and Vulkan rendering. (flutter/flutter#161547)
2025-02-11 [email protected] Marks Mac_benchmark basic_material_app_macos__compile to be flaky (flutter/flutter#162365)
2025-02-11 [email protected] Roll pub packages (flutter/flutter#163083)
2025-02-11 [email protected] Adds hasSelectedState parameter to matchesSemantics for migration (flutter/flutter#163014)
2025-02-11 [email protected] fix: Dispose codec after completing frame creation (flutter/flutter#159945)
2025-02-11 [email protected] [ios][secure_paste]show menu item based on info sent from framework (flutter/flutter#161103)
2025-02-11 [email protected] Update conductor to support monorepos (flutter/flutter#161704)
2025-02-11 [email protected] [Android] fix hcpp tapping, again, and add test. (flutter/flutter#163035)
2025-02-11 [email protected] Add new builder for experiment with dynamic modules. (flutter/flutter#162855)
2025-02-11 [email protected] Roll vulkan-deps to 9edf248c597b (flutter/flutter#162549)
2025-02-11 [email protected] Adds dialog and alertdialog role (flutter/flutter#162692)
2025-02-11 [email protected] Roll Dart SDK from 99789828cc95 to d9d7f103b6b7 (12 revisions) (flutter/flutter#163060)
2025-02-11 [email protected] [ Widget Preview ] Cleanup PreviewDetector code (flutter/flutter#163050)
2025-02-11 [email protected] Fix `SkiaException` -> `TestFailure`, add tests. (flutter/flutter#163054)
2025-02-11 [email protected] [Android] fix hcpp overlay layer intersection. (flutter/flutter#163024)
2025-02-11 [email protected] [ Widget Preview ] Update generated scaffold project to include early preview rendering (flutter/flutter#162847)
2025-02-11 [email protected] [Embedder] Implement merged platform and UI thread (flutter/flutter#162944)
2025-02-11 [email protected] [Android] Remove overlay when platform views are removed from screen. (flutter/flutter#162908)
2025-02-11 [email protected] Roll Dart to 3.8.0-76.0.dev (flutter/flutter#162913)
2025-02-11 [email protected] [Android] add HCPP platform views benchmark and integration test. (flutter/flutter#163018)
2025-02-11 [email protected] Roll Skia from 8c377e8bedd2 to 5b56d9a91633 (9 revisions) (flutter/flutter#163021)
2025-02-11 [email protected] Try golden-testing on a Mokey (`bringup: true`), retry on an emulator (flutter/flutter#163029)
2025-02-11 [email protected] Fix Linux keyboard support for AltGr (flutter/flutter#162495)
2025-02-11 [email protected] Update gen_keycodes output to new engine location. (flutter/flutter#162479)
2025-02-10 [email protected] [Android] add runtime flag to determine if HCPP is supported. (flutter/flutter#163004)
2025-02-10 [email protected] [iOS][Engine] Fix view removal process for AutofillContextAction.cancel (flutter/flutter#160653)
2025-02-10 [email protected] Re-land #162644: Remove `--verbose` from devicelab task executions. (flutter/flutter#163017)
2025-02-10 [email protected] Include device lab version for how to run test (flutter/flutter#163010)
2025-02-10 [email protected] Change the default optimization level to `-O2` for wasm in release mode. (flutter/flutter#162917)
2025-02-10 [email protected] [web] robustify safaridriver launch sequence (flutter/flutter#162919)
2025-02-10 [email protected] Return more eagerly when toggling service extensions (flutter/flutter#162774)
2025-02-10 [email protected] Fix doc reference typos (flutter/flutter#162893)
2025-02-10 [email protected] Roll Skia from 180ed4fc263d to 8c377e8bedd2 (4 revisions) (flutter/flutter#162998)
2025-02-10 [email protected] FYI matanlurey (does not require review, but probably should) on dev/test infra. (flutter/flutter#162642)
2025-02-10 [email protected] [Impeller] rrect_blur: scale max radius clamp by transform (flutter/flutter#161238)
...
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
Roll Flutter from 892f9c1 to e8f34a9 (71 revisions)

flutter/flutter@892f9c1...e8f34a9

2025-02-12 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Skia from f31c733c86c4 to 25937c31f153 (2 revisions) (#163127)" (flutter/flutter#163133)
2025-02-12 [email protected] Roll Skia from f31c733c86c4 to 25937c31f153 (2 revisions) (flutter/flutter#163127)
2025-02-12 [email protected] Update .ci.yaml to support Fuchsia cherrypick branches (flutter/flutter#163000)
2025-02-12 [email protected] Roll Skia from 6f17f2ebb2e5 to f31c733c86c4 (1 revision) (flutter/flutter#163112)
2025-02-12 [email protected] Roll Skia from a9dbb2479c26 to 6f17f2ebb2e5 (2 revisions) (flutter/flutter#163109)
2025-02-12 [email protected] [devicelab] dont strip symbols in platform views layout test. (flutter/flutter#163101)
2025-02-12 [email protected] [Impeller] mirror tile mode requires highp for Adreno. (flutter/flutter#163066)
2025-02-12 [email protected] Roll Skia from 5b56d9a91633 to a9dbb2479c26 (6 revisions) (flutter/flutter#163100)
2025-02-12 [email protected] Roll Dart SDK from d9d7f103b6b7 to fcef25f18e4d (3 revisions) (flutter/flutter#163098)
2025-02-12 [email protected] Generate a correct `.flutter-plugin-dependencies` file for iOS/macOS projects (flutter/flutter#162834)
2025-02-12 [email protected] Remove unsound artifacts, remove `*Sound` qualifier. (flutter/flutter#163015)
2025-02-12 [email protected] [Impeller] libImpeller: Add support for Metal and Vulkan rendering. (flutter/flutter#161547)
2025-02-11 [email protected] Marks Mac_benchmark basic_material_app_macos__compile to be flaky (flutter/flutter#162365)
2025-02-11 [email protected] Roll pub packages (flutter/flutter#163083)
2025-02-11 [email protected] Adds hasSelectedState parameter to matchesSemantics for migration (flutter/flutter#163014)
2025-02-11 [email protected] fix: Dispose codec after completing frame creation (flutter/flutter#159945)
2025-02-11 [email protected] [ios][secure_paste]show menu item based on info sent from framework (flutter/flutter#161103)
2025-02-11 [email protected] Update conductor to support monorepos (flutter/flutter#161704)
2025-02-11 [email protected] [Android] fix hcpp tapping, again, and add test. (flutter/flutter#163035)
2025-02-11 [email protected] Add new builder for experiment with dynamic modules. (flutter/flutter#162855)
2025-02-11 [email protected] Roll vulkan-deps to 9edf248c597b (flutter/flutter#162549)
2025-02-11 [email protected] Adds dialog and alertdialog role (flutter/flutter#162692)
2025-02-11 [email protected] Roll Dart SDK from 99789828cc95 to d9d7f103b6b7 (12 revisions) (flutter/flutter#163060)
2025-02-11 [email protected] [ Widget Preview ] Cleanup PreviewDetector code (flutter/flutter#163050)
2025-02-11 [email protected] Fix `SkiaException` -> `TestFailure`, add tests. (flutter/flutter#163054)
2025-02-11 [email protected] [Android] fix hcpp overlay layer intersection. (flutter/flutter#163024)
2025-02-11 [email protected] [ Widget Preview ] Update generated scaffold project to include early preview rendering (flutter/flutter#162847)
2025-02-11 [email protected] [Embedder] Implement merged platform and UI thread (flutter/flutter#162944)
2025-02-11 [email protected] [Android] Remove overlay when platform views are removed from screen. (flutter/flutter#162908)
2025-02-11 [email protected] Roll Dart to 3.8.0-76.0.dev (flutter/flutter#162913)
2025-02-11 [email protected] [Android] add HCPP platform views benchmark and integration test. (flutter/flutter#163018)
2025-02-11 [email protected] Roll Skia from 8c377e8bedd2 to 5b56d9a91633 (9 revisions) (flutter/flutter#163021)
2025-02-11 [email protected] Try golden-testing on a Mokey (`bringup: true`), retry on an emulator (flutter/flutter#163029)
2025-02-11 [email protected] Fix Linux keyboard support for AltGr (flutter/flutter#162495)
2025-02-11 [email protected] Update gen_keycodes output to new engine location. (flutter/flutter#162479)
2025-02-10 [email protected] [Android] add runtime flag to determine if HCPP is supported. (flutter/flutter#163004)
2025-02-10 [email protected] [iOS][Engine] Fix view removal process for AutofillContextAction.cancel (flutter/flutter#160653)
2025-02-10 [email protected] Re-land #162644: Remove `--verbose` from devicelab task executions. (flutter/flutter#163017)
2025-02-10 [email protected] Include device lab version for how to run test (flutter/flutter#163010)
2025-02-10 [email protected] Change the default optimization level to `-O2` for wasm in release mode. (flutter/flutter#162917)
2025-02-10 [email protected] [web] robustify safaridriver launch sequence (flutter/flutter#162919)
2025-02-10 [email protected] Return more eagerly when toggling service extensions (flutter/flutter#162774)
2025-02-10 [email protected] Fix doc reference typos (flutter/flutter#162893)
2025-02-10 [email protected] Roll Skia from 180ed4fc263d to 8c377e8bedd2 (4 revisions) (flutter/flutter#162998)
2025-02-10 [email protected] FYI matanlurey (does not require review, but probably should) on dev/test infra. (flutter/flutter#162642)
2025-02-10 [email protected] [Impeller] rrect_blur: scale max radius clamp by transform (flutter/flutter#161238)
...
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
Roll Flutter from 892f9c1 to e8f34a9 (71 revisions)

flutter/flutter@892f9c1...e8f34a9

2025-02-12 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Skia from f31c733c86c4 to 25937c31f153 (2 revisions) (#163127)" (flutter/flutter#163133)
2025-02-12 [email protected] Roll Skia from f31c733c86c4 to 25937c31f153 (2 revisions) (flutter/flutter#163127)
2025-02-12 [email protected] Update .ci.yaml to support Fuchsia cherrypick branches (flutter/flutter#163000)
2025-02-12 [email protected] Roll Skia from 6f17f2ebb2e5 to f31c733c86c4 (1 revision) (flutter/flutter#163112)
2025-02-12 [email protected] Roll Skia from a9dbb2479c26 to 6f17f2ebb2e5 (2 revisions) (flutter/flutter#163109)
2025-02-12 [email protected] [devicelab] dont strip symbols in platform views layout test. (flutter/flutter#163101)
2025-02-12 [email protected] [Impeller] mirror tile mode requires highp for Adreno. (flutter/flutter#163066)
2025-02-12 [email protected] Roll Skia from 5b56d9a91633 to a9dbb2479c26 (6 revisions) (flutter/flutter#163100)
2025-02-12 [email protected] Roll Dart SDK from d9d7f103b6b7 to fcef25f18e4d (3 revisions) (flutter/flutter#163098)
2025-02-12 [email protected] Generate a correct `.flutter-plugin-dependencies` file for iOS/macOS projects (flutter/flutter#162834)
2025-02-12 [email protected] Remove unsound artifacts, remove `*Sound` qualifier. (flutter/flutter#163015)
2025-02-12 [email protected] [Impeller] libImpeller: Add support for Metal and Vulkan rendering. (flutter/flutter#161547)
2025-02-11 [email protected] Marks Mac_benchmark basic_material_app_macos__compile to be flaky (flutter/flutter#162365)
2025-02-11 [email protected] Roll pub packages (flutter/flutter#163083)
2025-02-11 [email protected] Adds hasSelectedState parameter to matchesSemantics for migration (flutter/flutter#163014)
2025-02-11 [email protected] fix: Dispose codec after completing frame creation (flutter/flutter#159945)
2025-02-11 [email protected] [ios][secure_paste]show menu item based on info sent from framework (flutter/flutter#161103)
2025-02-11 [email protected] Update conductor to support monorepos (flutter/flutter#161704)
2025-02-11 [email protected] [Android] fix hcpp tapping, again, and add test. (flutter/flutter#163035)
2025-02-11 [email protected] Add new builder for experiment with dynamic modules. (flutter/flutter#162855)
2025-02-11 [email protected] Roll vulkan-deps to 9edf248c597b (flutter/flutter#162549)
2025-02-11 [email protected] Adds dialog and alertdialog role (flutter/flutter#162692)
2025-02-11 [email protected] Roll Dart SDK from 99789828cc95 to d9d7f103b6b7 (12 revisions) (flutter/flutter#163060)
2025-02-11 [email protected] [ Widget Preview ] Cleanup PreviewDetector code (flutter/flutter#163050)
2025-02-11 [email protected] Fix `SkiaException` -> `TestFailure`, add tests. (flutter/flutter#163054)
2025-02-11 [email protected] [Android] fix hcpp overlay layer intersection. (flutter/flutter#163024)
2025-02-11 [email protected] [ Widget Preview ] Update generated scaffold project to include early preview rendering (flutter/flutter#162847)
2025-02-11 [email protected] [Embedder] Implement merged platform and UI thread (flutter/flutter#162944)
2025-02-11 [email protected] [Android] Remove overlay when platform views are removed from screen. (flutter/flutter#162908)
2025-02-11 [email protected] Roll Dart to 3.8.0-76.0.dev (flutter/flutter#162913)
2025-02-11 [email protected] [Android] add HCPP platform views benchmark and integration test. (flutter/flutter#163018)
2025-02-11 [email protected] Roll Skia from 8c377e8bedd2 to 5b56d9a91633 (9 revisions) (flutter/flutter#163021)
2025-02-11 [email protected] Try golden-testing on a Mokey (`bringup: true`), retry on an emulator (flutter/flutter#163029)
2025-02-11 [email protected] Fix Linux keyboard support for AltGr (flutter/flutter#162495)
2025-02-11 [email protected] Update gen_keycodes output to new engine location. (flutter/flutter#162479)
2025-02-10 [email protected] [Android] add runtime flag to determine if HCPP is supported. (flutter/flutter#163004)
2025-02-10 [email protected] [iOS][Engine] Fix view removal process for AutofillContextAction.cancel (flutter/flutter#160653)
2025-02-10 [email protected] Re-land #162644: Remove `--verbose` from devicelab task executions. (flutter/flutter#163017)
2025-02-10 [email protected] Include device lab version for how to run test (flutter/flutter#163010)
2025-02-10 [email protected] Change the default optimization level to `-O2` for wasm in release mode. (flutter/flutter#162917)
2025-02-10 [email protected] [web] robustify safaridriver launch sequence (flutter/flutter#162919)
2025-02-10 [email protected] Return more eagerly when toggling service extensions (flutter/flutter#162774)
2025-02-10 [email protected] Fix doc reference typos (flutter/flutter#162893)
2025-02-10 [email protected] Roll Skia from 180ed4fc263d to 8c377e8bedd2 (4 revisions) (flutter/flutter#162998)
2025-02-10 [email protected] FYI matanlurey (does not require review, but probably should) on dev/test infra. (flutter/flutter#162642)
2025-02-10 [email protected] [Impeller] rrect_blur: scale max radius clamp by transform (flutter/flutter#161238)
...
LongCatIsLooong added a commit to LongCatIsLooong/flutter that referenced this pull request Jul 21, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jul 22, 2025
…cel (#172490)

Between #145681 (autofill save prompt shows up for password fields when
you dismiss the keyboard) and #172250 (calling `TextInput.hide` causes
the current active text field to lose its text) the latter seems to be
the worse bug. The framework `EditableText` implementation only calls
`TextInput.hide` when switching input controls, so #172250 typically
does not affect flutter text fields itself, but becomes a problem if the
app wishes to add UI (similar to the iOS down-arrow button that would
show up above the keyboard when you're filling out a form) to dismiss
the keyboard.

This reopens #145681. See
#145681 (comment)

@koji-1009 does reverting sound ok to you?

## Pre-launch Checklist

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

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

<!-- 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
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Jul 24, 2025
…ion.cancel (flutter#172490)

Between flutter#145681 (autofill save prompt shows up for password fields when
you dismiss the keyboard) and flutter#172250 (calling `TextInput.hide` causes
the current active text field to lose its text) the latter seems to be
the worse bug. The framework `EditableText` implementation only calls
`TextInput.hide` when switching input controls, so flutter#172250 typically
does not affect flutter text fields itself, but becomes a problem if the
app wishes to add UI (similar to the iOS down-arrow button that would
show up above the keyboard when you're filling out a form) to dismiss
the keyboard.

This reopens flutter#145681. See
flutter#145681 (comment)

@koji-1009 does reverting sound ok to you?

## Pre-launch Checklist

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

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

<!-- 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
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Jul 24, 2025
…ion.cancel (flutter#172490)

Between flutter#145681 (autofill save prompt shows up for password fields when
you dismiss the keyboard) and flutter#172250 (calling `TextInput.hide` causes
the current active text field to lose its text) the latter seems to be
the worse bug. The framework `EditableText` implementation only calls
`TextInput.hide` when switching input controls, so flutter#172250 typically
does not affect flutter text fields itself, but becomes a problem if the
app wishes to add UI (similar to the iOS down-arrow button that would
show up above the keyboard when you're filling out a form) to dismiss
the keyboard.

This reopens flutter#145681. See
flutter#145681 (comment)

@koji-1009 does reverting sound ok to you?

## Pre-launch Checklist

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

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

<!-- 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
auto-submit bot pushed a commit that referenced this pull request Jul 24, 2025
…tAction.cancel (#172676)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

#172250

### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples

Fixes a bug where `TextInput.hide` call incorrect clears the text in the active text field.

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)

If an app calls `TextInput.hide` to hide the software keyboard, the user input in the current active text field will also be erased. It impacts the production app.
The framework itself doesn't seem to call `TextInput.hide` in a way that would affect the user.

### Workaround:
Is there a workaround for this issue?

Yes, in theory, developers can store and restore the `TextEditingValue`, when they need to call `TextInput.hide`, to undo the clear. However I suspect the reverted PR may also [break voiceover](#145681 (comment)).

### Risk:
What is the risk level of this cherry-pick?

This is a revert of #160653. The reverted PR was merged in February, and the previous implementation was [introduced in 2021](flutter/engine#23776).

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

  - [] No

This change is a revert so the added test will also get reverted.

### Validation Steps:
What are the steps to validate that this fix works?

To verify the fix on master (it has already landed on master), run this app:
```dart
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: SizedBox(
          child: ListView(
            children: [
              TextButton(
                child: Text('hide keyboard'),
                onPressed: () =>
                    SystemChannels.textInput.invokeListMethod("TextInput.hide"),
              ),
              TextField(
                controller: TextEditingController(text: '️a' * 20),
                maxLines: 1,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
```
focus the text field and then click the hide keyboard button. The text "aaaaaa..." should remain after the button is clicked.
auto-submit bot pushed a commit that referenced this pull request Jul 25, 2025
…ction.cancel (#172675)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

#172250

### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples

Fixes a bug where `TextInput.hide` call incorrect clears the text in the active text field.

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)

If an app calls `TextInput.hide` to hide the software keyboard, the user input in the current active text field will also be erased. It impacts the production app.
The framework itself doesn't seem to call `TextInput.hide` in a way that would affect the user.

### Workaround:
Is there a workaround for this issue?

Yes, in theory, developers can store and restore the `TextEditingValue`, when they need to call `TextInput.hide`, to undo the clear. However I suspect the reverted PR may also [break voiceover](#145681 (comment)).

### Risk:
What is the risk level of this cherry-pick?

This is a revert of #160653. The reverted PR was merged in February, and the previous implementation was [introduced in 2021](flutter/engine#23776).

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

  - [] No

This change is a revert so the added test will also get reverted.

### Validation Steps:
What are the steps to validate that this fix works?

To verify the fix on master (it has already landed on master), run this app:
```dart
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: SizedBox(
          child: ListView(
            children: [
              TextButton(
                child: Text('hide keyboard'),
                onPressed: () =>
                    SystemChannels.textInput.invokeListMethod("TextInput.hide"),
              ),
              TextField(
                controller: TextEditingController(text: '️a' * 20),
                maxLines: 1,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
```
focus the text field and then click the hide keyboard button. The text "aaaaaa..." should remain after the button is clicked.
azatech pushed a commit to azatech/flutter that referenced this pull request Jul 28, 2025
…ion.cancel (flutter#172490)

Between flutter#145681 (autofill save prompt shows up for password fields when
you dismiss the keyboard) and flutter#172250 (calling `TextInput.hide` causes
the current active text field to lose its text) the latter seems to be
the worse bug. The framework `EditableText` implementation only calls
`TextInput.hide` when switching input controls, so flutter#172250 typically
does not affect flutter text fields itself, but becomes a problem if the
app wishes to add UI (similar to the iOS down-arrow button that would
show up above the keyboard when you're filling out a form) to dismiss
the keyboard.

This reopens flutter#145681. See
flutter#145681 (comment)

@koji-1009 does reverting sound ok to you?

## Pre-launch Checklist

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

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

<!-- 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
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
…ion.cancel (flutter#172490)

Between flutter#145681 (autofill save prompt shows up for password fields when
you dismiss the keyboard) and flutter#172250 (calling `TextInput.hide` causes
the current active text field to lose its text) the latter seems to be
the worse bug. The framework `EditableText` implementation only calls
`TextInput.hide` when switching input controls, so flutter#172250 typically
does not affect flutter text fields itself, but becomes a problem if the
app wishes to add UI (similar to the iOS down-arrow button that would
show up above the keyboard when you're filling out a form) to dismiss
the keyboard.

This reopens flutter#145681. See
flutter#145681 (comment)

@koji-1009 does reverting sound ok to you?

## Pre-launch Checklist

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

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

<!-- 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
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
…ion.cancel (flutter#172490)

Between flutter#145681 (autofill save prompt shows up for password fields when
you dismiss the keyboard) and flutter#172250 (calling `TextInput.hide` causes
the current active text field to lose its text) the latter seems to be
the worse bug. The framework `EditableText` implementation only calls
`TextInput.hide` when switching input controls, so flutter#172250 typically
does not affect flutter text fields itself, but becomes a problem if the
app wishes to add UI (similar to the iOS down-arrow button that would
show up above the keyboard when you're filling out a form) to dismiss
the keyboard.

This reopens flutter#145681. See
flutter#145681 (comment)

@koji-1009 does reverting sound ok to you?

## Pre-launch Checklist

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

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

<!-- 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
korca0220 pushed a commit to korca0220/flutter that referenced this pull request Sep 22, 2025
…ion.cancel (flutter#172490)

Between flutter#145681 (autofill save prompt shows up for password fields when
you dismiss the keyboard) and flutter#172250 (calling `TextInput.hide` causes
the current active text field to lose its text) the latter seems to be
the worse bug. The framework `EditableText` implementation only calls
`TextInput.hide` when switching input controls, so flutter#172250 typically
does not affect flutter text fields itself, but becomes a problem if the
app wishes to add UI (similar to the iOS down-arrow button that would
show up above the keyboard when you're filling out a form) to dismiss
the keyboard.

This reopens flutter#145681. See
flutter#145681 (comment)

@koji-1009 does reverting sound ok to you?

## Pre-launch Checklist

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

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

<!-- 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
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
…ion.cancel (flutter#172490)

Between flutter#145681 (autofill save prompt shows up for password fields when
you dismiss the keyboard) and flutter#172250 (calling `TextInput.hide` causes
the current active text field to lose its text) the latter seems to be
the worse bug. The framework `EditableText` implementation only calls
`TextInput.hide` when switching input controls, so flutter#172250 typically
does not affect flutter text fields itself, but becomes a problem if the
app wishes to add UI (similar to the iOS down-arrow button that would
show up above the keyboard when you're filling out a form) to dismiss
the keyboard.

This reopens flutter#145681. See
flutter#145681 (comment)

@koji-1009 does reverting sound ok to you?

## Pre-launch Checklist

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

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

<!-- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine flutter/engine related. See also e: labels. platform-ios iOS applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AutofillContextAction.cancel in AutofillGroup#onDisposeAction does not work as expected on iPhone.

4 participants