element
element copied to clipboard
[Bug Report] input添加属性show-password后,点击眼睛图标,光标获取焦点位置问题
Element UI version
2.10.1
OS/Browsers version
windows10/chrome76.0.3809.87
Vue version
2.6.12
Reproduction Link
https://codepen.io/lm312/pen/oNqyLLM
Steps to reproduce
密码输入框输入密码,点击切换右侧小眼睛图标
What is Expected?
光标焦点应该移到已输入字符的末尾位置
What is actually happening?
光标焦点就移到了最开始位置
在本地运行没有这个问题
好吧,我弄错版本了
还是没问题啊
我看2.15.9没有这个问题,我用的版本太旧了
你用的那个版本,我在本地试了好像也没问题
| | @.*** | | @.*** |
---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2022年08月10日 15:16 | | 收件人 | @.> | | 抄送至 | @.@.> | | 主题 | Re: [ElemeFE/element] [Bug Report] input添加属性show-password后,点击眼睛图标,光标获取焦点位置问题 (Issue #22074) |
我看2.15.9没有这个问题,我用的版本太旧了
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
2.10.1 谷歌浏览器 确实有这个问题
2.10.1 谷歌浏览器 确实有这个问题
花了几分钟处理了下感觉还行
mounted () {
this.$watch(
() => {
return this.$refs.input.passwordVisible
},
(val) => {
this.$refs.input.blur();
this.$refs.input.focus();
}
)
}
https://codepen.io/JokingLulu/pen/ZEqLROz