Skip to content

Commit

Permalink
fix(cc-button): prevent click events in skeleton / waiting
Browse files Browse the repository at this point in the history
Fixes #994
  • Loading branch information
florian-sanders-cc committed Apr 2, 2024
1 parent a7b42c7 commit 1239779
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/cc-button/cc-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class CcButton extends LitElement {
e.stopPropagation();

// we need to check that because we use aria-disabled which doesn't prevent the onclick event to be fired.
if (this.disabled) {
if (this.disabled || this.skeleton || this.waiting) {
return;
}

Expand Down Expand Up @@ -632,6 +632,10 @@ export class CcButton extends LitElement {
.cc-link .text-normal {
font-size: 1em;
}
.cc-link.skeleton:hover {
color: transparent;
}
`,
];
}
Expand Down

0 comments on commit 1239779

Please sign in to comment.