Fix disable ha-progress button (#22939)

* Fix disable ha-progress button

* Simplify ha-progress disabled fix

* Fix ha-progress-button click handler

* fix ha-progress-button pointer-events
This commit is contained in:
Wendelin 2024-11-21 16:30:28 +01:00 committed by GitHub
parent 6b0afe6ebb
commit 43911ef3be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,7 +22,6 @@ export class HaProgressButton extends LitElement {
<mwc-button
?raised=${this.raised}
.disabled=${this.disabled || this.progress}
@click=${this._buttonTapped}
class=${this._result || ""}
>
<slot></slot>
@ -63,22 +62,18 @@ export class HaProgressButton extends LitElement {
}, 2000);
}
private _buttonTapped(ev: Event): void {
if (this.progress) {
ev.stopPropagation();
}
}
static get styles(): CSSResultGroup {
return css`
:host {
outline: none;
display: inline-block;
position: relative;
pointer-events: none;
}
mwc-button {
transition: all 1s;
pointer-events: initial;
}
mwc-button.success {