Disable context menu#128365
Conversation
5198da1 to
ab24799
Compare
|
This is great, makes the demo work just like you'd expect. Should MenuAnchor take care of disabling web context menus (perhaps optionally) itself? |
No, because we can't know what they will bind to opening the menu. It doesn't make sense to disable it unless it's using the same key/button binding as the browser menu. |
|
Good point. Still, using the same event as the browser to trigger opening the menu is likely to be a common case, so we're making writing portable code a bit more tedious. What if MenuAnchor set up itself up as a right-button context menu - with the platform-specific triggering event tweaks from your example - and disabled the browser menu by default. And we allowed developers to easily defeat the default behavior? |
|
We could make a constructor for I think including it in an example does at least help surface it, although it would be better in the docs, and maybe a special constructor for context menus. |
flutter/flutter@8a5c22e...6e254a3 2023-06-08 [email protected] [labeler] Set sync labels to false to stop removing labels (flutter/flutter#128446) 2023-06-08 [email protected] Update Chrome version for testing (flutter/flutter#128447) 2023-06-08 [email protected] Revert "Redo make inspector weakly referencing the inspected objects." (flutter/flutter#128506) 2023-06-08 [email protected] Use `--target-os` for appropriate precompiled targets. (flutter/flutter#127567) 2023-06-08 [email protected] Redo make inspector weakly referencing the inspected objects. (flutter/flutter#128471) 2023-06-07 [email protected] Roll Flutter Engine from 1089ce6874cf to a5f7d5d75ff2 (11 revisions) (flutter/flutter#128473) 2023-06-07 [email protected] Disable context menu (flutter/flutter#128365) 2023-06-07 [email protected] Adds vmservices to retrieve android applink settings (flutter/flutter#125998) 2023-06-07 [email protected] Roll Flutter Engine from 4f4486b00be2 to 1089ce6874cf (20 revisions) (flutter/flutter#128460) 2023-06-07 [email protected] Fix typos 'wether' -> 'whether' (flutter/flutter#128392) 2023-06-07 [email protected] Roll engine, patch expression evaluation (flutter/flutter#128255) 2023-06-07 [email protected] Roll Packages from da72219 to a84b2c2 (1 revision) (flutter/flutter#128444) 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Description
Changes the context menu example for
MenuAnchorso that it uses right-click, or (on macOS and iOS only) ctrl-left-click, for the context menu. Also disables the browser context menu on web platforms.Tests