Skip to content

Clicking on different DialogTriggers consecutively adds a new FluentProvider div to the DOM #31356

Answered by bsunderhus
adrianpzamora asked this question in Q&A
Discussion options

You must be logged in to vote

TLDR; You cannot 😅

Hey there @adrianpzamora. That extra node is a portal where the dialog will be rendered. that is a common strategy for surface elements, like popovers/dialog/menu and etc,. adding it to a different order in the DOM, right after the whole content makes rendering it above content easier (not many layouting recalc fights), it also makes keyboard navigation and tab indexing less nuanced, as it's the last element on the page. The same happens for our Popover, Menu, Dropdown, Combobox and Tooltip components.

Here's the line code that declares the Portal on the DialogSurface:

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bsunderhus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants