DEV: Use key over the deprecated keyCode (#13795)

Makes the code a bit more readable. Inspired by https://github.com/emberjs/ember.js/pull/19185
This commit is contained in:
Jarek Radosz
2021-08-09 11:41:36 +02:00
committed by GitHub
parent 8df48b516f
commit e68c1d5ba5
25 changed files with 165 additions and 66 deletions

View File

@ -77,7 +77,7 @@ createWidget("discourse-poll-option", {
},
keyDown(e) {
if (e.keyCode === 13) {
if (e.key === "Enter") {
this.click(e);
}
},