Add autofocus on the first field in SMTP/Messenger settings UI

This commit is contained in:
Kailash Nadh 2021-01-30 11:00:06 +05:30
parent 68808d0cf3
commit 535b505404
1 changed files with 10 additions and 0 deletions

View File

@ -558,6 +558,11 @@ export default Vue.extend({
tls_enabled: true,
tls_skip_verify: false,
});
this.$nextTick(() => {
const items = document.querySelectorAll('.mail-servers input[name="host"]');
items[items.length - 1].focus();
});
},
removeSMTP(i) {
@ -581,6 +586,11 @@ export default Vue.extend({
max_msg_retries: 2,
timeout: '5s',
});
this.$nextTick(() => {
const items = document.querySelectorAll('.messengers input[name="name"]');
items[items.length - 1].focus();
});
},
removeMessenger(i) {