Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MenuAnchor closes on internal scroll #122696

Conversation

bleroux
Copy link
Contributor

@bleroux bleroux commented Mar 15, 2023

Description

This PR modifies _MenuAnchorState._handleScroll logic.
Before this PR, if the root menu was scrollable and a scroll event is emitted, top level menus will react to this scroll event and close the root menu.
After this PR, only the root menu reacts to external scroll events and closes itself.

Related Issue

Fixes #122168

Tests

Adds 1 test.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Mar 15, 2023
Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@gspencergoog
Copy link
Contributor

Thanks for fixing that @bleroux!

@bleroux bleroux force-pushed the fix_menuAnchor_close_on_internal_scroll branch from d3dc25a to e4d5b90 Compare March 15, 2023 18:28
@bleroux bleroux added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 15, 2023
@auto-submit auto-submit bot merged commit 5e54139 into flutter:master Mar 15, 2023
@bleroux bleroux deleted the fix_menuAnchor_close_on_internal_scroll branch March 15, 2023 22:06
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
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 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.

Scrolling closes menuAnchor widget
2 participants