Fix popups in 0.113. Fix #115

This commit is contained in:
thomas committed 2020-07-24 18:58:29 +02:00
1 parent 88ca719af4
commit 954c960789
6 files changed
+169 -10

No files matched your search

+4 -3
View File
@@ -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;
};