mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-23 15:09:16 +08:00
fix(Stepper): readonly not work in lagacy mobile safari (#5976)
This commit is contained in:
parent
cbe136ebdd
commit
537e80e37a
@ -315,7 +315,7 @@ export default createComponent({
|
||||
this.focused = true;
|
||||
this.$emit('focus', event);
|
||||
|
||||
// hack for safari
|
||||
// readonly not work in lagacy mobile safari
|
||||
/* istanbul ignore if */
|
||||
if (this.readonly) {
|
||||
this.blur();
|
||||
|
@ -208,6 +208,12 @@ export default createComponent({
|
||||
|
||||
onFocus(event) {
|
||||
this.$emit('focus', event);
|
||||
|
||||
// readonly not work in lagacy mobile safari
|
||||
/* istanbul ignore if */
|
||||
if (this.disableInput && this.$refs.input) {
|
||||
this.$refs.input.blur();
|
||||
}
|
||||
},
|
||||
|
||||
onBlur(event) {
|
||||
@ -280,6 +286,7 @@ export default createComponent({
|
||||
{...createListeners('minus')}
|
||||
/>
|
||||
<input
|
||||
ref="input"
|
||||
type={this.integer ? 'tel' : 'text'}
|
||||
role="spinbutton"
|
||||
class={bem('input')}
|
||||
|
Loading…
x
Reference in New Issue
Block a user