How to force another menu to open when one another is already opened? #2114
-
Hello everyone, In this example: https://react-spectrum.adobe.com/react-aria/useMenuTrigger.html, if you duplicate the I would like that the the second menu opens, whether the first menu is already opened or not. If the first menu is already opened, then it closes because you click outside. Is it possible? And if yes then how please. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Another remark: For what I have tested so far, it looks like there is some kind of event propagation cancellation because it behaves the same with other component (not done with react-aria). Like closing another Popup when a react-aria menu is opened. When you click on the "close" button of the Popup, the menu closes but the Dialog remains. |
Beta Was this translation helpful? Give feedback.
-
Looks like this was possible with |
Beta Was this translation helpful? Give feedback.
-
This is intentional. Only one overlay at a time can be open except in the case of nested overlays, for example, submenus or a menu in a dialog. |
Beta Was this translation helpful? Give feedback.
This is intentional. Only one overlay at a time can be open except in the case of nested overlays, for example, submenus or a menu in a dialog.
Future work will make the interaction pattern feel a bit more natural, which will prevent the hover effect and other interactions while an overlay is open. We decided it was worth fixing the two open overlays at once before we got to the rest. As you noted, there were a few bugs open about that exact problem.