fix(modal): inline modals inherit ion-page styling (#24723)

Resolves #24706

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
This commit is contained in:
Sean Perkins
2022-02-08 13:47:51 -05:00
committed by GitHub
parent c6381ce4f9
commit 596aad435b
2 changed files with 13 additions and 0 deletions

View File

@@ -89,6 +89,15 @@ export const CoreDelegate = () => {
BaseComponent.appendChild(el);
await new Promise(resolve => componentOnReady(el, resolve));
} else {
// If there is no component, then we need to create a new parent
// element to apply the css classes to.
const el = BaseComponent.ownerDocument && BaseComponent.ownerDocument.createElement('div');
cssClasses.forEach(c => el.classList.add(c));
// Move each child from the original template to the new parent element.
el.append(...BaseComponent.children);
// Append the new parent element to the original parent element.
BaseComponent.appendChild(el);
}
/**