When blurred, mark the field as touched when focus moved outside the chip grid.
()
| 417 | |
| 418 | /** When blurred, mark the field as touched when focus moved outside the chip grid. */ |
| 419 | _blur() { |
| 420 | if (!this.disabled) { |
| 421 | // Check whether the focus moved to chip input. |
| 422 | // If the focus is not moved to chip input, mark the field as touched. If the focus moved |
| 423 | // to chip input, do nothing. |
| 424 | // Timeout is needed to wait for the focus() event trigger on chip input. |
| 425 | setTimeout(() => { |
| 426 | if (!this.focused) { |
| 427 | this._propagateChanges(); |
| 428 | this._markAsTouched(); |
| 429 | } |
| 430 | }); |
| 431 | } |
| 432 | } |
| 433 | |
| 434 | /** |
| 435 | * Removes the `tabindex` from the chip grid and resets it back afterwards, allowing the |
no test coverage detected