Upload: fix duplicated handleClick due to keydown bubbling (#10624)

pull/10628/head
杨奕 2018-04-09 17:05:25 +08:00 committed by GitHub
parent 5da88ade6b
commit 6f4f57172b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -155,6 +155,7 @@ export default {
}
},
handleKeydown(e) {
if (e.target !== e.currentTarget) return;
if (e.keyCode === 13 || e.keyCode === 32) {
this.handleClick();
}