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.focused = true;
|
||||||
this.$emit('focus', event);
|
this.$emit('focus', event);
|
||||||
|
|
||||||
// hack for safari
|
// readonly not work in lagacy mobile safari
|
||||||
/* istanbul ignore if */
|
/* istanbul ignore if */
|
||||||
if (this.readonly) {
|
if (this.readonly) {
|
||||||
this.blur();
|
this.blur();
|
||||||
|
@ -208,6 +208,12 @@ export default createComponent({
|
|||||||
|
|
||||||
onFocus(event) {
|
onFocus(event) {
|
||||||
this.$emit('focus', 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) {
|
onBlur(event) {
|
||||||
@ -280,6 +286,7 @@ export default createComponent({
|
|||||||
{...createListeners('minus')}
|
{...createListeners('minus')}
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
|
ref="input"
|
||||||
type={this.integer ? 'tel' : 'text'}
|
type={this.integer ? 'tel' : 'text'}
|
||||||
role="spinbutton"
|
role="spinbutton"
|
||||||
class={bem('input')}
|
class={bem('input')}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user