Skip to content

Commit

Permalink
Add autofocus on the first field in SMTP/Messenger settings UI
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Jan 30, 2021
1 parent 68808d0 commit 535b505
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 535b505

Please sign in to comment.