You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/packages/vant/src/field/Field.tsx relies on this property and only allows the value to be set when composing is false, the user won't be able to enter anything into the field.
Reproduce Steps
The composing property is achieved in vue, it'is not accurate in some scenarios.
For example, when you need to input an SMS code, the input field gets focused at first. If you click the submit button, it triggers the blur event, which also triggers the input value check. Then, the input gets focused again. At this point, the compositionstart event has been triggered, but not the compositionend event. So, composing is still true, and there's no way to set it to false. When you receive the SMS code, on iOS, you can tap the keyboard to fill in the code right away. However, if some UI library relies on this property and only allows the value to be set when composing is false, the user won't be able to enter anything into the field.
Actually, there's a property called isComposing that we can check in JavaScript. Why not handle this yourself?
Device / Browser
iOS
The text was updated successfully, but these errors were encountered:
Reproduction Link
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/isComposing
Vant Version
4.2.0
Describe the Bug
/packages/vant/src/field/Field.tsx relies on this property and only allows the value to be set when composing is false, the user won't be able to enter anything into the field.
Reproduce Steps
The composing property is achieved in vue, it'is not accurate in some scenarios.
For example, when you need to input an SMS code, the input field gets focused at first. If you click the submit button, it triggers the blur event, which also triggers the input value check. Then, the input gets focused again. At this point, the compositionstart event has been triggered, but not the compositionend event. So, composing is still true, and there's no way to set it to false. When you receive the SMS code, on iOS, you can tap the keyboard to fill in the code right away. However, if some UI library relies on this property and only allows the value to be set when composing is false, the user won't be able to enter anything into the field.
Actually, there's a property called isComposing that we can check in JavaScript. Why not handle this yourself?
Device / Browser
iOS
The text was updated successfully, but these errors were encountered: