Skip to content

Commit

Permalink
Fix disable ha-progress button (#22939)
Browse files Browse the repository at this point in the history
* Fix disable ha-progress button

* Simplify ha-progress disabled fix

* Fix ha-progress-button click handler

* fix ha-progress-button pointer-events
  • Loading branch information
wendevlin authored Nov 21, 2024
1 parent 6b0afe6 commit 43911ef
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/components/buttons/ha-progress-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 43911ef

Please sign in to comment.