ElemeFE / ElemeFE/element

[Bug Report] Use "show-password" in the input component, click button for "show password", the cursor position will automatically move to the beginning

Open
#18,573 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Element UI version
2.13.0

### OS/Browsers version
win10 / Chrome Version 79.0.3945.88

### Vue version
2.6.1

### Reproduction Link
https://codepen.io/duanmw/pen/YzPrdmv

### Steps to reproduce
Go to codepen.io and run the password box demo on element's official website. After entering the password in the password box, the input cursor is at the end.
![image](https://user-images.githubusercontent.com/31787613/71648793-f124c900-2d43-11ea-9ade-ed194774494b.png)
But after clicking the "Show Password" button, the cursor at this time will automatically move to the beginning of the password box.
![image](https://user-images.githubusercontent.com/31787613/71648808-19acc300-2d44-11ea-959d-6ad63db4f876.png)

### What is Expected?
Input prompt cursor position remains unchanged.

### What is actually happening?
Input prompt cursor position changed to the beginning.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.