Skip to content

[test] Fix detached anchorEl elements in tests#47929

Merged
Janpot merged 3 commits intomui:masterfrom
Janpot:fix/detached-anchorEl-tests
Mar 9, 2026
Merged

[test] Fix detached anchorEl elements in tests#47929
Janpot merged 3 commits intomui:masterfrom
Janpot:fix/detached-anchorEl-tests

Conversation

@Janpot
Copy link
Copy Markdown
Member

@Janpot Janpot commented Mar 9, 2026

Summary

  • Replace detached document.createElement('div') anchor elements with elements properly appended to document.body using beforeAll/afterAll for setup and cleanup
  • Affects tests in Popper, Popover, Menu, List, useSlot, and GridLegacy

Append anchorEl elements to document.body instead of using detached DOM
elements, using beforeAll/afterAll for setup and cleanup.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@mui-bot
Copy link
Copy Markdown

mui-bot commented Mar 9, 2026

Netlify deploy preview

https://deploy-preview-47929--material-ui.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 2706cf7

@Janpot Janpot marked this pull request as ready for review March 9, 2026 10:06
@Janpot Janpot requested a review from silviuaavram March 9, 2026 10:06
@Janpot Janpot merged commit 88ec1bc into mui:master Mar 9, 2026
18 checks passed
@zannager zannager added the test label Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants