Skip to content

Commit

Permalink
Merge pull request #742 from dermotduffy/hover-again
Browse files Browse the repository at this point in the history
Fix the hover menu styling (again)
  • Loading branch information
dermotduffy authored Jun 27, 2022
2 parents 6b8333d + 569673f commit 7f43029
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1767,6 +1767,9 @@ export class FrigateCard extends LitElement {
this._getConfig().menu.style === 'outside' &&
this._getConfig().menu.position === 'top';

// Caution: Keep the main div and the menu next to one another in order to
// ensure the hover menu styling continues to work.

return html` <ha-card
id="ha-card"
.actionHandler=${actionHandler({
Expand Down Expand Up @@ -1806,6 +1809,7 @@ export class FrigateCard extends LitElement {
this._message ? renderMessage(this._message) : ''
}
</div>
${!renderMenuAbove ? this._renderMenu() : ''}
${!this._message && this._getConfig().elements
? // Elements need to render after the main views so it can render 'on
// top'.
Expand All @@ -1826,7 +1830,6 @@ export class FrigateCard extends LitElement {
>
</frigate-card-elements>`
: ``}
${!renderMenuAbove ? this._renderMenu() : ''}
</ha-card>`;
}

Expand Down

0 comments on commit 7f43029

Please sign in to comment.