focus download password input on render. fixes #745
This commit is contained in:
parent
fdcf4c152a
commit
b5b29aeb17
|
@ -22,8 +22,7 @@ module.exports = function(state, emit) {
|
|||
autocomplete="off"
|
||||
placeholder="${state.translate('unlockInputPlaceholder')}"
|
||||
oninput=${inputChanged}
|
||||
type="password"
|
||||
autofocus />
|
||||
type="password" />
|
||||
<input type="submit"
|
||||
id="unlock-btn"
|
||||
class="btn btn-hidden"
|
||||
|
@ -31,6 +30,10 @@ module.exports = function(state, emit) {
|
|||
</form>
|
||||
</div>`;
|
||||
|
||||
if (!(div instanceof String)) {
|
||||
setTimeout(() => document.querySelector('#unlock-input').focus());
|
||||
}
|
||||
|
||||
function inputChanged() {
|
||||
const input = document.getElementById('unlock-input');
|
||||
const btn = document.getElementById('unlock-btn');
|
||||
|
|
Loading…
Reference in New Issue