Fixes an issue where TapRegion would consume taps regardless of navigation state#169067
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
justinmc
left a comment
There was a problem hiding this comment.
@PrimaelQuemerais Can you add a test for this?
| registry: TapRegionRegistry.maybeOf(context), | ||
| enabled: enabled, | ||
| consumeOutsideTaps: consumeOutsideTaps, | ||
| consumeOutsideTaps: isCurrent && consumeOutsideTaps, |
There was a problem hiding this comment.
@gspencergoog Do you know if this is a reasonable solution to TapRegion listening to taps outside of its route?
…vigation This test ensures that TapRegion with consumeOutsideTaps does not consume taps after navigating to a new page.
justinmc
left a comment
There was a problem hiding this comment.
LGTM as this is along the same lines as #155297. FYI @chunhtai @Mairramer .
| expect(count2, 1); // tapRegion2 should not respond anymore. | ||
| }); | ||
|
|
||
| // Regression test for the consumeOutsideTaps issue when navigating between pages |
There was a problem hiding this comment.
Just leave the GitHub URL: "Regression test for #169061."
|
|
||
| await tester.pumpAndSettle(); | ||
|
|
||
| // Navigate to the second page |
There was a problem hiding this comment.
Nit: Period at the end of the sentence here and below.
| true, | ||
| reason: 'Button tap was not consumed by a TapRegion on a non-current route', | ||
| ); | ||
| }); |
There was a problem hiding this comment.
Confirmed that this test fails on master 👍
…of navigation state (flutter/flutter#169067)
…of navigation state (flutter/flutter#169067)
…of navigation state (flutter/flutter#169067)
flutter/flutter@adffe24...ac12f66 2025-07-09 [email protected] Roll Packages from cba2e90 to 4a231ae (5 revisions) (flutter/flutter#171879) 2025-07-09 [email protected] Replace [FinderBase] with [Finder] in the documentation of Matchers (flutter/flutter#168279) 2025-07-09 [email protected] Revert "Mark web_long_running_tests_2_5 as bringup" (flutter/flutter#171872) 2025-07-09 [email protected] Apply normalization to TimePickerThemeData.inputDecorationTheme (flutter/flutter#171584) 2025-07-09 [email protected] Fix InputDecorationThemeData.activeIndicatorBorder is not applied (flutter/flutter#171764) 2025-07-09 [email protected] Fix multi-view GL rendering not working since software rendering was added (flutter/flutter#171409) 2025-07-09 [email protected] Marks Linux_android_emu android_engine_vulkan_tests to be unflaky (flutter/flutter#171141) 2025-07-08 [email protected] Roll Fuchsia Linux SDK from AinHuT0vgOelA1g7_... to 0-xqmXWc4cXzw3tfe... (flutter/flutter#171823) 2025-07-08 [email protected] Marks Linux_android_emu android_display_cutout to be unflaky (flutter/flutter#171140) 2025-07-08 [email protected] [Documentation] When updating kgp minimum document additional changes that are required (flutter/flutter#171819) 2025-07-08 [email protected] Marks Linux_android_emu android_engine_opengles_tests to be unflaky (flutter/flutter#171142) 2025-07-08 [email protected] Add support for running dart2wasm in dry run mode on js compilations (flutter/flutter#171682) 2025-07-08 [email protected] Remove now duplicate un-forward ports for Android (flutter/flutter#171473) 2025-07-08 [email protected] [skia] Update usage of removed gn flag (flutter/flutter#171800) 2025-07-08 [email protected] [web] Disable auto-formatting for the stack_trace.dart test file (flutter/flutter#171801) 2025-07-08 [email protected] Bump warn and error versions of agp, kotlin and gradle versions in preparation for gradle 9 (flutter/flutter#171776) 2025-07-08 [email protected] Removed string keys (flutter/flutter#171293) 2025-07-08 [email protected] Add `radioSide` to `RadioListTile` (flutter/flutter#171318) 2025-07-08 [email protected] Roll Fuchsia Test Scripts from ZpnML-jis0gVIvtx5... to MnFlN7VWM_7h7EmBV... (flutter/flutter#171787) 2025-07-08 [email protected] Add/use `addMachineOutputFlag`/`outputsMachineFormat` instead of strings (flutter/flutter#171459) 2025-07-08 [email protected] Update translation from console (flutter/flutter#171556) 2025-07-08 [email protected] [ Tool ] Support upgrading to a new Flutter version pointing to the same revision as a previous version (flutter/flutter#171783) 2025-07-08 [email protected] Multi-window support (engine) (flutter/flutter#168728) 2025-07-08 [email protected] Fixes an issue where TapRegion would consume taps regardless of navigation state (flutter/flutter#169067) 2025-07-08 [email protected] SliverSemantics (flutter/flutter#167300) 2025-07-08 [email protected] Roll Skia from e159882c6ce0 to 0fef076beec3 (3 revisions) (flutter/flutter#171779) 2025-07-08 [email protected] Run hot_restart_web_amd_test.dart on Mac/Windows (flutter/flutter#171281) 2025-07-08 [email protected] Roll Packages from 2c52f24 to cba2e90 (2 revisions) (flutter/flutter#171775) 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],[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
…ation state (flutter#169067) Fixes flutter#169061 Expands on flutter#155297 This PR fixes the issue where TapRegion with consumeOutsideTaps enabled would consume taps even after navigating to a different page. ## 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. - [x] 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.
…ation state (flutter#169067) Fixes flutter#169061 Expands on flutter#155297 This PR fixes the issue where TapRegion with consumeOutsideTaps enabled would consume taps even after navigating to a different page. ## 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. - [x] 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.
…ation state (flutter#169067) Fixes flutter#169061 Expands on flutter#155297 This PR fixes the issue where TapRegion with consumeOutsideTaps enabled would consume taps even after navigating to a different page. ## 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. - [x] 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.
flutter/flutter@adffe24...ac12f66 2025-07-09 [email protected] Roll Packages from cba2e90 to 4a231ae (5 revisions) (flutter/flutter#171879) 2025-07-09 [email protected] Replace [FinderBase] with [Finder] in the documentation of Matchers (flutter/flutter#168279) 2025-07-09 [email protected] Revert "Mark web_long_running_tests_2_5 as bringup" (flutter/flutter#171872) 2025-07-09 [email protected] Apply normalization to TimePickerThemeData.inputDecorationTheme (flutter/flutter#171584) 2025-07-09 [email protected] Fix InputDecorationThemeData.activeIndicatorBorder is not applied (flutter/flutter#171764) 2025-07-09 [email protected] Fix multi-view GL rendering not working since software rendering was added (flutter/flutter#171409) 2025-07-09 [email protected] Marks Linux_android_emu android_engine_vulkan_tests to be unflaky (flutter/flutter#171141) 2025-07-08 [email protected] Roll Fuchsia Linux SDK from AinHuT0vgOelA1g7_... to 0-xqmXWc4cXzw3tfe... (flutter/flutter#171823) 2025-07-08 [email protected] Marks Linux_android_emu android_display_cutout to be unflaky (flutter/flutter#171140) 2025-07-08 [email protected] [Documentation] When updating kgp minimum document additional changes that are required (flutter/flutter#171819) 2025-07-08 [email protected] Marks Linux_android_emu android_engine_opengles_tests to be unflaky (flutter/flutter#171142) 2025-07-08 [email protected] Add support for running dart2wasm in dry run mode on js compilations (flutter/flutter#171682) 2025-07-08 [email protected] Remove now duplicate un-forward ports for Android (flutter/flutter#171473) 2025-07-08 [email protected] [skia] Update usage of removed gn flag (flutter/flutter#171800) 2025-07-08 [email protected] [web] Disable auto-formatting for the stack_trace.dart test file (flutter/flutter#171801) 2025-07-08 [email protected] Bump warn and error versions of agp, kotlin and gradle versions in preparation for gradle 9 (flutter/flutter#171776) 2025-07-08 [email protected] Removed string keys (flutter/flutter#171293) 2025-07-08 [email protected] Add `radioSide` to `RadioListTile` (flutter/flutter#171318) 2025-07-08 [email protected] Roll Fuchsia Test Scripts from ZpnML-jis0gVIvtx5... to MnFlN7VWM_7h7EmBV... (flutter/flutter#171787) 2025-07-08 [email protected] Add/use `addMachineOutputFlag`/`outputsMachineFormat` instead of strings (flutter/flutter#171459) 2025-07-08 [email protected] Update translation from console (flutter/flutter#171556) 2025-07-08 [email protected] [ Tool ] Support upgrading to a new Flutter version pointing to the same revision as a previous version (flutter/flutter#171783) 2025-07-08 [email protected] Multi-window support (engine) (flutter/flutter#168728) 2025-07-08 [email protected] Fixes an issue where TapRegion would consume taps regardless of navigation state (flutter/flutter#169067) 2025-07-08 [email protected] SliverSemantics (flutter/flutter#167300) 2025-07-08 [email protected] Roll Skia from e159882c6ce0 to 0fef076beec3 (3 revisions) (flutter/flutter#171779) 2025-07-08 [email protected] Run hot_restart_web_amd_test.dart on Mac/Windows (flutter/flutter#171281) 2025-07-08 [email protected] Roll Packages from 2c52f24 to cba2e90 (2 revisions) (flutter/flutter#171775) 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],[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
…of navigation state (flutter/flutter#169067)
…of navigation state (flutter/flutter#169067)
…of navigation state (flutter/flutter#169067)
…of navigation state (flutter/flutter#169067)
…of navigation state (flutter/flutter#169067)
…ation state (flutter#169067) Fixes flutter#169061 Expands on flutter#155297 This PR fixes the issue where TapRegion with consumeOutsideTaps enabled would consume taps even after navigating to a different page. ## 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. - [x] 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.
…ation state (flutter#169067) Fixes flutter#169061 Expands on flutter#155297 This PR fixes the issue where TapRegion with consumeOutsideTaps enabled would consume taps even after navigating to a different page. ## 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. - [x] 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.
Fixes #169061
Expands on #155297
This PR fixes the issue where TapRegion with consumeOutsideTaps enabled would consume taps even after navigating to a different page.
Pre-launch Checklist
///).