Repository navigation
Commit 65fa39d
committed
fix(ContextMenu): a context request commits its open before the next input, inside a shadow root too
The request comes from a listener on the trigger, and inside a shadow root
window.event is unset there (the DOM sets it only for listeners outside
shadow trees), so React cannot tell the update is a discrete input: it gave
the open default priority and committed it in a later task. The menu already
showed, but its press-outside listener comes with that commit, and a press in
between found none (MenuPressShadowRoot.a11y:76 failed 10 of 12). flushSync
commits the open in the request's own task, as React commits a request it
dispatches itself; the press-outside case now passes 5 of 5 and :76 12 of 12.1 parent e6576c8 commit 65fa39d
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
1080 | 1081 | | |
1081 | 1082 | | |
1082 | 1083 | | |
1083 | | - | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
1084 | 1094 | | |
1085 | 1095 | | |
1086 | 1096 | | |
| |||
0 commit comments