Fix popups outside of lovelace
This commit is contained in:
parent
cd230cc89b
commit
605caa906c
File diff suppressed because one or more lines are too long
@ -46,10 +46,11 @@ export function load_lovelace() {
|
||||
const res = document.createElement("partial-panel-resolver");
|
||||
res.hass = hass();
|
||||
res.route = {path: "/lovelace/"};
|
||||
// res._updateRoutes();
|
||||
res._updateRoutes();
|
||||
try {
|
||||
document.querySelector("home-assistant").appendChild(res).catch((error) => {});
|
||||
document.querySelector("home-assistant").appendChild(res);
|
||||
} catch (error) {
|
||||
} finally {
|
||||
document.querySelector("home-assistant").removeChild(res);
|
||||
}
|
||||
if(customElements.get("hui-view")) return true;
|
||||
|
@ -13,7 +13,7 @@ export function closePopUp() {
|
||||
export function popUp(title, card, large=false, style=null, fullscreen=false) {
|
||||
|
||||
// Force _moreInfoEl to be loaded
|
||||
fireEvent("hass-more-info", {entityId: null});
|
||||
fireEvent("hass-more-info", {entityId: null}, document.querySelector("home-assistant"));
|
||||
const moreInfoEl = document.querySelector("home-assistant")._moreInfoEl;
|
||||
// Close and reopen to clear any previous styling
|
||||
// Necessary for popups from popups
|
||||
|
Loading…
x
Reference in New Issue
Block a user