4 ms·
At the bottom of the article they mention: What happened here? The tooltip was attached to the tooltip container and not to the body. This invalidated a mu
by sandstrom 5y ago
At the bottom of the article they mention:
What happened here? The tooltip was attached to the tooltip container and not to the body.
This invalidated a much smaller subtree, which was the tooltip container. The tooltip container
is not visible in the page, so modifying it doesn’t invalidate the complete page render tree.
If the tooltip container would have been visible in the page, then the complete render tree
would be invalidated but in this case only an independent subtree was invalidated.
So the tooltip container needs to be hidden with e.g. `display: none`?
- btown 5y agoAlso curious about this: what creates a "boundary" that prevents an invalid subtree from invalidating the parent? Does it need to be hidden, or simply placed absolutely etc.? The article is so well-researched otherwise that I'm sure the OP knows the answer to this, but it frustratingly didn't make it into the article itself!
- atfzl 5y agoHaving `display: none` is not required for the tooltip container. The container is an empty div which is not visible, and even after adding children which are not directly visible `inside` this div keeps this container div invisible. You can check out some examples in https://github.com/mui-org/material-ui/issues/27879 https://github.com/mui-org/material-ui/issues/27879
- sandstrom 5y agoThanks for the update! :) Awesome article btw!