We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fee2755 commit 8e905b7Copy full SHA for 8e905b7
packages/menu-surface/MenuSurface.svelte
@@ -95,8 +95,15 @@
95
if (anchor) {
96
element && element.parentNode.classList.remove('mdc-menu-surface--anchor');
97
}
98
+ let isHoisted = false;
99
+ if (menuSurface) {
100
+ isHoisted = menuSurface.foundation_.isHoistedElement_;
101
+ }
102
if (instantiate !== false) {
- menuSurface && menuSurface.destroy()
103
+ menuSurface.destroy();
104
105
+ if (isHoisted) {
106
+ element.parentNode.removeChild(element);
107
108
});
109
0 commit comments