mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 22:50:53 +03:00
focus download password input on render. fixes #745
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user