You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[material_ui] MenuAnchor corrupts Tab and F1 shortcut labels on JS #195003
On JavaScript web targets (dart2js and ddc), MenuAnchor and MenuBar render unlocalized non-Unicode shortcut triggers such as SingleActivator(LogicalKeyboardKey.tab, control: true) and LogicalKeyboardKey.f1 as "Ctrl+\t" and "Ctrl+\u0801" instead of "Ctrl+Tab" and "Ctrl+F1", because menu_anchor.dart#L2632-L2637 checks logicalKeyId & LogicalKeyboardKey.planeMask == 0x0 and 32-bit JS bitwise & truncates planeMask (0x0ff00000000) to 0.
Proposed Fix
Fall back directly to trigger.keyLabel in _LocalizedShortcutLabeler.getShortcutLabel, which already handles Unicode plane 0x00 via JS-safe LogicalKeyboardKey._nonValueBits.
Reproduction on Chrome JS (ddc)
Running flutter test --platform chrome test/menu_anchor_test.dart with MenuItemButton(shortcut: const SingleActivator(LogicalKeyboardKey.tab, control: true), ...) fails on @ 2ef3d18398:
The following TestFailure was thrown running a test:
Expected: exactly one matching candidate
Actual: _TextWidgetFinder:<Found 0 widgets with text "Ctrl+Tab": []>
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 flutter doctor -v and a minimal reproduction of the issue.
Activity
[material_ui] Fix MenuAnchor non-Unicode shortcut labels on JS web (f…
github-actions commentedon Nov 10, 2026
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
flutter doctor -vand a minimal reproduction of the issue.