fix(NumberKeyboard): eliminate tap delay on safari (#6667)

* fix(NumberKeyboard): eliminate click delay on safari

* chore: upd comment
This commit is contained in:
neverland 2020-07-01 22:59:38 +08:00 committed by GitHub
parent 32b74da530
commit 5b7265fa5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -193,6 +193,7 @@ export default {
}
}
// eliminate tap delay on safari
preventDefault(event, stopPropagation);
this.checkTap();

View File

@ -45,8 +45,10 @@ export default createComponent({
}
},
onTouchEnd() {
onTouchEnd(event) {
if (this.active) {
// eliminate tap delay on safari
event.preventDefault();
this.active = false;
this.$emit('press', this.text, this.type);
}