Use key instead of keycode for key event (#16625)

This commit is contained in:
Paul Bottein
2023-05-25 18:47:57 +02:00
committed by GitHub
parent c4ff1a8646
commit 71bb540352
15 changed files with 15 additions and 15 deletions

View File

@@ -324,7 +324,7 @@ export class HaVoiceCommandDialog extends LitElement {
private _handleKeyUp(ev: KeyboardEvent) {
const input = ev.target as HaTextField;
if (ev.keyCode === 13 && input.value) {
if (ev.key === "Enter" && input.value) {
this._processText(input.value);
input.value = "";
this._showSendButton = false;