From bffcaa1c17ab92f745b912eb9cc805123a8a74a1 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 10 Feb 2020 11:16:19 +0000 Subject: [PATCH] Refocus credential typedInput when hide/show button clicked --- .../@node-red/editor-client/src/js/ui/common/typedInput.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js index dc8d8e387..a3f066223 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js @@ -188,9 +188,15 @@ if (currentType === "text") { that.input.attr("type","password"); eyeCon.removeClass("fa-eye-slash").addClass("fa-eye"); + setTimeout(function() { + that.input.focus(); + },50); } else { that.input.attr("type","text"); eyeCon.removeClass("fa-eye").addClass("fa-eye-slash"); + setTimeout(function() { + that.input.focus(); + },50); } }).hide(); var eyeCon = $('').css("margin-left","-1px").appendTo(eyeButton);