mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
Fixed error in text-input mixin when using auto-fill
no issue - `event.keyCode` can be `undefined` when using Chrome or Safari's login auto-fill
This commit is contained in:
parent
83d2f70792
commit
39cddf0da5
@ -61,10 +61,12 @@ export default Mixin.create({
|
||||
},
|
||||
|
||||
keyUp(event) {
|
||||
let methodName = this._getMethodFromKeyCode(event.keyCode);
|
||||
let method = this.get(`keyEvents.${methodName}`);
|
||||
if (method) {
|
||||
method(event.target.value);
|
||||
if (event.keyCode) {
|
||||
let methodName = this._getMethodFromKeyCode(event.keyCode);
|
||||
let method = this.get(`keyEvents.${methodName}`);
|
||||
if (method) {
|
||||
method(event.target.value);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user