- Notifications
You must be signed in to change notification settings - Fork30k
Fix SelectionArea handles overlapping context menu on Android#182663
Fix SelectionArea handles overlapping context menu on Android#182663JhonaCodes wants to merge 2 commits intoflutter:masterfrom
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Code Review
The pull request correctly addresses the layering issue on Android where selection handles could appear above the context menu. By reordering the calls in_handleTouchLongPressEnd to show handles before the toolbar, the toolbar is inserted later into theOverlay and thus paints on top. This change is consistent with other interaction handlers inSelectableRegionState. My review identifies a minor formatting issue and suggests adding a regression test to ensure the fix remains robust, referencing the repository's guidelines on formatting and testing.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This PR fixes an Android
SelectionArealayering issue where selection handles can paint above the expanded contextmenu (overflow actions), causing visual overlap and making menu actions harder to read/tap.
The change updates the overlay/show ordering so the context menu remains visually above selection handles when both are
visible.
Before
Screen.Recording.2026-02-21.at.2.55.59.am.mov
After
Screen.Recording.2026-02-21.at.2.46.22.am.mov
Fixes#168765
No changes were made in the [flutter/tests] repo.
Test-exempt: small overlay ordering change, manually validated with the issue repro.
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](https://
developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the
gemini-code-assistbot shouldnot 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.
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