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
Commit abc8dbf
Browse filesBrowse the repository at this point in the historyBrowse files
fix(DropdownMenu): a cancelled touch clears the row a finger lit
Under a finger, on every device and every menu surface, a press that
the browser takes (pointercancel, a second finger, a scroll) now clears
the row the finger lit, as UIKit clears it when the list starts
scrolling. That holds under any presentation, in sub-menus and in the
bottom sheet's action list. When the window loses focus under a finger,
its gesture is withdrawn: it stays tracked to its release, which acts
on nothing and whose click is swallowed, and any new press ends it. A
mouse keeps its highlight and its click.
- menuPressGesture: the withdraw input and withdrawn phase, and the
clear flag on a finger's cancel.
- useMenuPress: both clears follow the machine's clear flag, which only
a finger or pen sets.
- MenuBottomSheetActionList: its list takes focus (tabIndex -1) when no
row is lit, as DropdownMenu's own menu does, so a cleared row loses
focus.
- Tests: the machine, hook, sub-menu and sheet-list cases, and the
accessibility case in real Chromium. A [fix] changeset.
[fix] After the window loses focus during a finger's press, lifting that finger no longer acts on any menu (DropdownMenu, MoreMenu, ContextMenu, Selector, and menus built on the public `useMenuPress`), and a tap on a menu's trigger still opens it. Under a finger, a row lit by a press that is cancelled (a scroll, a second finger, the window losing focus) now clears, as on iOS (`spec:AST-094` FR28). It clears in DropdownMenu and its sub-menus under any `presentation`, MoreMenu, ContextMenu, Selector's list and the bottom sheet's action list, and in a menu built on the public `useMenuPress` whose root can take focus. A mouse keeps its highlight.
it('a cancelled finger in a flyout clears its lit row as the root\u2019s does, on every device (spec:AST-094 FR28, FR43), presentation="popover" too',async()=>{
1324
+
constoriginalMatchMedia=window.matchMedia;
1325
+
// A large screen, its primary pointer coarse (a tablet) or fine (a
1326
+
// touchscreen laptop): the root is an anchored popover and its sub-menu
it('a cancelled finger clears the row it lit in the sheet\u2019s action list; a mouse keeps its highlight (spec:AST-094 FR28, spec:AST-017 FR59)',()=>{
0 commit comments