Fix popups in 0.113. Fix #115
This commit is contained in:
@@ -199,8 +199,6 @@ class BrowserMod {
|
||||
}
|
||||
|
||||
popup_card(ev) {
|
||||
const moreInfoEl = document.querySelector("home-assistant")._moreInfoEl;
|
||||
if(moreInfoEl && !moreInfoEl.getAttribute('aria-hidden')) return;
|
||||
if(!lovelace()) return;
|
||||
const ll = lovelace();
|
||||
const data = {
|
||||
@@ -211,7 +209,10 @@ class BrowserMod {
|
||||
if(!ev.detail || !ev.detail.entityId) return;
|
||||
const d = data[ev.detail.entityId];
|
||||
if(!d) return;
|
||||
window.setTimeout(() => {
|
||||
fireEvent("hass-more-info", {entityId: "."}, document.querySelector("home-assistant"));
|
||||
popUp(d.title, d.card, d.large || false, d.style);
|
||||
}, 50);
|
||||
}
|
||||
|
||||
debug(msg) {
|
||||
@@ -274,7 +275,7 @@ class BrowserMod {
|
||||
if(!msg.card) return;
|
||||
|
||||
const fn = () => {
|
||||
popUp(msg.title, msg.card, msg.large, msg.style, msg.auto_close);
|
||||
popUp(msg.title, msg.card, msg.large, msg.style, msg.auto_close||msg.hide_header);
|
||||
if(msg.auto_close)
|
||||
this.autoclose_popup_active = true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user