-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report] 3.6.7 版本对 Field
光标位置的修正存在副作用
#11331
Comments
@seeWindDev 已经发布 3.6.8 修复了 |
我用4.0.1最新版还是出现这个bug了 |
提供个复现问题的 codesandbox 链接看看? |
我上面写错了,v3 最新版是 3.6.9,我看你的链接里是 3.6.8,可以升级试下。 |
看你的代码,跟这个 issue 不是一个问题吧? 是使用 formatter 后光标位置不对 |
vue 用的 v3 版本是3.2.25 |
@chenjiahan 看来还是不要在 Field 里对光标位置进行修正了,因为无法预知用户会有什么样的 formatter... |
@seeWindDev 我的业务里也有在用户输入时实时加空格分隔的需求,需要自己在 formatter 里修正光标位置,我反正还没完全搞定... |
下个版本会调整光标修正的触发条件。 |
@chenjiahan @seeWindDev 我提了一个pr,尝试彻底修正光标定位问题,并兼容自定义 formatter,详见: #11360 |
重现链接
https://codesandbox.io/s/vant-3-issue-template-forked-yfv27x?file=/src/App.vue
Vant 版本
3.6.7
描述一下你遇到的问题。
1. 测试机型
2. 副作用来源
fix(Field): keep selection position after updating value by chenjiahan · Pull Request #11308 · youzan/vant
3. 副作用描述
Field
组件失焦状态下,异步赋值时,图示机型意外聚焦并拉起了键盘重现步骤
设备/浏览器
ios 15.7.1
The text was updated successfully, but these errors were encountered: