Minimal example which doesn't remove the element from the top layer: https://jsfiddle.net/uv8r39ef/
Bug 1834972 Comment 7 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Minimal example which doesn't remove the element from the top layer: https://jsfiddle.net/uv8r39ef/. Can be checked by adding the assertion: ``` MOZ_ASSERT(!OwnerDoc()->TopLayerContains(*this)); ``` to https://searchfox.org/mozilla-central/rev/0c2945ad4769e2d4428c72e6ddd78d60eb920394/dom/html/nsGenericHTMLElement.cpp#720.