Skip to content

Commit

Permalink
Improved fix
Browse files Browse the repository at this point in the history
Improved fix
  • Loading branch information
gadgetchnnel committed Feb 6, 2020
1 parent 82ef9b3 commit b2b200a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion custom_card.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lovelace-home-feed-card": {
"version": "0.3.6",
"version": "0.3.7",
"remote_location": "https://raw.githubusercontent.com/gadgetchnnel/lovelace-home-feed-card/master/lovelace-home-feed-card.js",
"visit_repo": "https://github.com/gadgetchnnel/lovelace-home-feed-card",
"changelog": "https://github.com/gadgetchnnel/lovelace-home-feed-card"
Expand Down
24 changes: 16 additions & 8 deletions lovelace-home-feed-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -761,14 +761,22 @@ class HomeFeedCard extends HomeFeedCardHelpers.LitElement {
moreInfo.large = large;
//document.querySelector("home-assistant").provideHass(message);

setTimeout(() => {
let interval = setInterval(() => {
if (moreInfo.getAttribute('aria-hidden')) {
popup.parentNode.removeChild(popup);
clearInterval(interval);
}
}, 100)
}, 1000);
moreInfo._dialogOpenChanged = function(newVal) {
if (!newVal) {
console.log("Here",this.stateObj);
if(this.stateObj)
this.fire("hass-more-info", {entityId: null});

if (this.shadowRoot == popup.parentNode) {
this._page = null;
this.shadowRoot.removeChild(popup);

const oldContent = this.shadowRoot.querySelector("more-info-controls");
if(oldContent) oldContent.style['display'] = "";
}
}
}

history.onpushstate = this.closePopUp;
return moreInfo;
}
Expand Down

0 comments on commit b2b200a

Please sign in to comment.