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
The composing property is achieved in packages/runtime-dom/src/directives/vModel.ts, 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?
What is expected?
Why do you need to handle the composing property in packages/runtime-dom/src/directives/vModel.ts?
What is actually happening?
The vant 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.
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered:
This might be using the implementation form vue2. The absence of isComposing might be to ensure compatibility across different browser environments(perhaps isComposing behaves inconsistently in various browsers/webviews).
Since there is no reproducible demo, we cannot investigate the reason. Could you please provide a demo that can reproduce the issues?
Vue version
3.5.13
Link to minimal reproduction
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/isComposing
Steps to reproduce
The composing property is achieved in packages/runtime-dom/src/directives/vModel.ts, 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?
What is expected?
Why do you need to handle the composing property in packages/runtime-dom/src/directives/vModel.ts?
What is actually happening?
The vant 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.
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: