adjust focus
This commit is contained in:
parent
c542789c93
commit
391df3ed2d
@ -645,8 +645,9 @@ const wrapTextWithPasswordHide = (text: TextComponent) => {
|
|||||||
hider.innerHTML = eyeOff;
|
hider.innerHTML = eyeOff;
|
||||||
hider.addEventListener("click", (e) => {
|
hider.addEventListener("click", (e) => {
|
||||||
const isText = text.inputEl.getAttribute("type") === "text";
|
const isText = text.inputEl.getAttribute("type") === "text";
|
||||||
text.inputEl.setAttribute("type", isText ? "password" : "text");
|
|
||||||
hider.innerHTML = isText ? eyeOff : eye;
|
hider.innerHTML = isText ? eyeOff : eye;
|
||||||
|
text.inputEl.setAttribute("type", isText ? "password" : "text");
|
||||||
|
text.inputEl.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
// the init type of text el is password
|
// the init type of text el is password
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user