Utility method to make host definition/tests more clear.
(event: KeyboardEvent)
| 158 | |
| 159 | /** Utility method to make host definition/tests more clear. */ |
| 160 | _keydown(event: KeyboardEvent) { |
| 161 | if (this.empty && event.keyCode === BACKSPACE) { |
| 162 | // Ignore events where the user is holding down backspace |
| 163 | // so that we don't accidentally remove too many chips. |
| 164 | if (!event.repeat) { |
| 165 | this._chipGrid._focusLastChip(); |
| 166 | } |
| 167 | event.preventDefault(); |
| 168 | } else { |
| 169 | this._emitChipEnd(event); |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | /** Checks to see if the blur should emit the (chipEnd) event. */ |
| 174 | _blur() { |
no test coverage detected