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

@@ -130,7 +130,7 @@ class HaInputSelectForm extends LitElement {
private _handleKeyAdd(ev: KeyboardEvent) {
ev.stopPropagation();
if (ev.keyCode !== 13) {
if (ev.key !== "Enter") {
return;
}
this._addOption();