-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
[PopUpMenuButton] When the menu is open, scroll gesture doesn't dismiss the modal barrier #90223
Comments
@nosmirck |
@darshankawar I was looking at some apps and this is what I've found: Mobile:
Web/Desktop:
At first, we'd like to at least have consistency with native mobile (close the menu with tap down instead of tap) with the option to pass through the gesture. |
Thanks for the detailed analysis. Although I see the same behavior on latest stable and master, I am a bit unsure if this is a limitation or a bug. 90223.movI am going ahead and keeping it open for further insights from the team. stable, master flutter doctor -v
|
So, digging a bit I found in the source of The comment above this Gesture Recognizer reads as follows:
That description would suggest that it would accept any gesture, however, it only accept tapUps that are not a cancel. A cancel happens when the gesture is a drag, which makes sense for inputs that accept taps (we see this on "native" implementations of similar popups for desktop and mobile as well as any web framework). This, at least for mobile, seems like a bug. The It could also happen that for some reason the gesture recognizer is not calling tapUp when detects a tapCancel. Ultimately, the gesture, at least to mimic a native mobile popupMenu should be tapDown, to close as soon as a tap is detected. This would fix the issue on mobile and make it behave exactly as native. For Web and Desktop, the default should be a passTrough of the gesture. A good solution I propose would be to add some kind of enum property to the popupMenu to decide the behaviour for the popupMenu's modal barrier: closeOnAnyTap, passThrough. (maybe more?) and use by default passThrough on Web/Desktop and closeOnAnyTap for mobile. |
Ths should be split into two issues
|
@nosmirck |
Sure thing! Should I tag you there? |
You can simply file the proposal and mention this issue for context, rest should be taken care of :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
cc @TahaTesser This change causes a regression. tap show dialog preparing revert |
This is caused by modal barrier will cancel any ongoing gesture when it is disposed by clicking |
Closed. |
FYI, we had a report that this is not fixed when you scroll with the scroll wheel: "[this issue] is not fixed for scroll-wheel scrolling. If a pop-up menu is open (anywhere in the application), scrolling the scroll-wheel doesn't doesn't do anything until the pop-up menu is closed." |
Hi, is there any progress on this? I found this problem in the flutter app I use, and I thought it was weird that PopUpMenu would block page scrolling. |
After 2 years, this bug has not been fixed yet. |
Same issue here |
Steps to Reproduce
This is the minimal code required to reproduce it, open the popup menu from the AppBar and attempt to scroll the ListView behind it. Only possible actions are either tap anywhere outside the popup menu to dismiss it or select an item. Scrolling the background ListView should be possible. Optionally, we should be able to set the behaviour for this, we could have this default behavior (only possible actions are to tap to close or select item), close on any action (not just tap, any gesture, like drag) or pass through the gesture (let the gesture be passed down if not captured by the pop-up menu).
Flutter Doctor
The text was updated successfully, but these errors were encountered: