mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-25 10:56:35 +08:00
fix(NumberKeyboard): eliminate tap delay on safari (#6667)
* fix(NumberKeyboard): eliminate click delay on safari * chore: upd comment
This commit is contained in:
parent
32b74da530
commit
5b7265fa5f
@ -193,6 +193,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eliminate tap delay on safari
|
||||||
preventDefault(event, stopPropagation);
|
preventDefault(event, stopPropagation);
|
||||||
|
|
||||||
this.checkTap();
|
this.checkTap();
|
||||||
|
@ -45,8 +45,10 @@ export default createComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onTouchEnd() {
|
onTouchEnd(event) {
|
||||||
if (this.active) {
|
if (this.active) {
|
||||||
|
// eliminate tap delay on safari
|
||||||
|
event.preventDefault();
|
||||||
this.active = false;
|
this.active = false;
|
||||||
this.$emit('press', this.text, this.type);
|
this.$emit('press', this.text, this.type);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user