diff --git a/app/templates/downloadPassword.js b/app/templates/downloadPassword.js index 6b9a7cad..bca7ccf1 100644 --- a/app/templates/downloadPassword.js +++ b/app/templates/downloadPassword.js @@ -22,8 +22,7 @@ module.exports = function(state, emit) { autocomplete="off" placeholder="${state.translate('unlockInputPlaceholder')}" oninput=${inputChanged} - type="password" - autofocus /> + type="password" /> `; + if (!(div instanceof String)) { + setTimeout(() => document.querySelector('#unlock-input').focus()); + } + function inputChanged() { const input = document.getElementById('unlock-input'); const btn = document.getElementById('unlock-btn');