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"
|
autocomplete="off"
|
||||||
placeholder="${state.translate('unlockInputPlaceholder')}"
|
placeholder="${state.translate('unlockInputPlaceholder')}"
|
||||||
oninput=${inputChanged}
|
oninput=${inputChanged}
|
||||||
type="password"
|
type="password" />
|
||||||
autofocus />
|
|
||||||
<input type="submit"
|
<input type="submit"
|
||||||
id="unlock-btn"
|
id="unlock-btn"
|
||||||
class="btn btn-hidden"
|
class="btn btn-hidden"
|
||||||
@ -31,6 +30,10 @@ module.exports = function(state, emit) {
|
|||||||
</form>
|
</form>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
|
if (!(div instanceof String)) {
|
||||||
|
setTimeout(() => document.querySelector('#unlock-input').focus());
|
||||||
|
}
|
||||||
|
|
||||||
function inputChanged() {
|
function inputChanged() {
|
||||||
const input = document.getElementById('unlock-input');
|
const input = document.getElementById('unlock-input');
|
||||||
const btn = document.getElementById('unlock-btn');
|
const btn = document.getElementById('unlock-btn');
|
||||||
|
Loading…
Reference in New Issue
Block a user