mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
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:
@ -77,7 +77,7 @@ createWidget("discourse-poll-option", {
|
||||
},
|
||||
|
||||
keyDown(e) {
|
||||
if (e.keyCode === 13) {
|
||||
if (e.key === "Enter") {
|
||||
this.click(e);
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user