Ensure that button returns to its default state
uses the .blur() method to set the icon button back to its unfocused state after the set time
This commit is contained in:
parent
228e2187e3
commit
1d7518af07
@ -62,6 +62,8 @@ export class CopyButton extends LitElement {
|
||||
|
||||
this.timeoutId = window.setTimeout(() => {
|
||||
this.isCopied = false;
|
||||
const button = this.shadowRoot?.querySelector('sl-icon-button');
|
||||
button?.blur(); // Remove focus from the button to set it back to its default state
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user