The Portal
part cannot be omitted safely when nesting popups
#1215
Labels
bug 🐛
Something doesn't work
component: alert dialog
This is the name of the generic UI component, not the React module!
component: dialog
This is the name of the generic UI component, not the React module!
component: menu
This is the name of the generic UI component, not the React module!
component: popover
The React component.
component: preview card
The React component.
component: select
This is the name of the generic UI component, not the React module!
component: tooltip
This is the name of the generic UI component, not the React module!
Omitting the
Portal
part can currently lead to various bugs when dealing with nested popups. The docs always use thePortal
part, but omitting it is technically allowed right now (no runtime error).Known bugs
Some of the bugs include (non-exhaustively):
Popover
inside aDialog
when neither has a portal prevents theesc
key from only dismissing the Popover — both get dismissed simultaneouslyPopover
,Select
orMenu
insideDialog
when onlyDialog
has a portal causes focus to be lost when attempting to tab outside of the inner popup's last tabbable elementMenu
insideDialog
when only the the root menu has a portal (with submenus not using a portal) causes the rootMenu
to stay stuck open when tabbing outside of one of the submenusSome bugs are already covered in #1107, which has a PR open that fixes it already.
Solution
Portal
is missing entirely (this is likely the best solution, at least for now)The text was updated successfully, but these errors were encountered: