focus password field when clicking password checkbox

This commit is contained in:
Erica Wright 2017-10-24 12:47:03 -04:00
parent 046f227003
commit a5d28adc44
No known key found for this signature in database
GPG key ID: D9F2AF9D67D0AAB7

View file

@ -27,6 +27,9 @@ module.exports = function(state, emit) {
.getElementById('copy') .getElementById('copy')
.classList.toggle('wait-password', e.target.checked); .classList.toggle('wait-password', e.target.checked);
document.getElementById('copy-btn').disabled = e.target.checked; document.getElementById('copy-btn').disabled = e.target.checked;
if (e.target.checked) {
document.getElementById('unlock-input').focus();
}
} }
function setPassword(event) { function setPassword(event) {