Skip to content
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
15 changes: 14 additions & 1 deletion src/panels/lovelace/editor/card-editor/hui-card-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export class HuiCardPicker extends LitElement {
background: var(--primary-background-color, #fafafa);
cursor: pointer;
box-sizing: border-box;
position: relative;
}

.card-header {
Expand Down Expand Up @@ -242,6 +243,13 @@ export class HuiCardPicker extends LitElement {
align-items: center;
justify-content: center;
}

.overlay {
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed I think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed. Otherwise I can still toggle

}
`,
];
}
Expand Down Expand Up @@ -297,7 +305,12 @@ export class HuiCardPicker extends LitElement {
}

return html`
<div class="card" @click="${this._cardPicked}" .config="${cardConfig}">
<div class="card">
<div
class="overlay"
@click=${this._cardPicked}
.config=${cardConfig}
Comment on lines +311 to +312
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't have to move this, but it it fine.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha I guess I didnt test with out changing. I just assumed it would be above it and not register the click on the lower element

></div>
<div
class="preview ${classMap({
description: !element || element.tagName === "HUI-ERROR-CARD",
Expand Down