-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Card Picker: Fix Clicking cards #5425
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 { | ||
|
|
@@ -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; | ||
| } | ||
| `, | ||
| ]; | ||
| } | ||
|
|
@@ -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
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You didn't have to move this, but it it fine.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed I think?
There was a problem hiding this comment.
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