Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the hover menu styling (again) #742

Merged
merged 1 commit into from
Jun 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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