From d1b02ed2887b0c2e1354723e6c8271407d8886f6 Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Mon, 21 May 2018 12:17:15 +0200 Subject: [PATCH] passphrase modal input fix --- src/js/components/modal/Passphrase.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/js/components/modal/Passphrase.js b/src/js/components/modal/Passphrase.js index 24a01254..21ea3e01 100644 --- a/src/js/components/modal/Passphrase.js +++ b/src/js/components/modal/Passphrase.js @@ -123,13 +123,12 @@ export default class PinModal extends Component { if (this.passphraseInput) { this.passphraseInput.value = passphraseInputValue; - this.passphraseInput.setAttribute("type", visible ? "text" : "password"); + this.passphraseInput.setAttribute("type", visible || (!visible && !passphraseFocused) ? "text" : "password"); } if (this.passphraseRevisionInput) { this.passphraseRevisionInput.value = passphraseRevisionInputValue; - this.passphraseRevisionInput.setAttribute("type", visible ? "text" : "password"); + this.passphraseRevisionInput.setAttribute("type", visible || (!visible && !passphraseRevisionFocused) ? "text" : "password"); } - } onPassphraseChange = (input: string, value: string): void => {