Repository navigation
Commit 53f4d39
authored
fix(Menu): prevent sub-menu focus fight when it opens on top of trigger (#2745)
When a sub-menu opens above the parent trigger (constrained viewport),
the pointer is now over the sub-content but the parent's
highlightedElement becomes undefined because no parent item is
being hovered. Previously this would close the sub-menu, causing
a cycle where it reopenes and closes again.
Now when highlightedElement becomes undefined while a sub-menu is
active, the sub-menu stays open. It only closes when the highlight
moves to a different parent item.
Closes #24461 parent faf27e7 commit 53f4d39
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
173 | 179 | | |
174 | 180 | | |
175 | 181 | | |
| |||
0 commit comments