mirror of
https://github.com/material-components/material-web.git
synced 2024-11-10 20:11:57 +03:00
fix(text-field): fix focus forwarding for SSR
PiperOrigin-RevId: 438425873
This commit is contained in:
parent
c401d43ffd
commit
dcaa6a7ee3
@ -103,13 +103,15 @@ export class TextField extends LitElement {
|
||||
`;
|
||||
}
|
||||
|
||||
protected handleClick() {
|
||||
protected async handleClick() {
|
||||
if (this.disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.matches(':focus-within')) {
|
||||
this.focus();
|
||||
// TODO(b/210731759): replace with this.focus() once SSR supports
|
||||
// delegating focus
|
||||
(await this.input).focus();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user