Browse Source

focus element on mounted function

pull/342/head
Guillaume Vincent 8 years ago
parent
commit
fdb6c071e6
2 changed files with 10 additions and 6 deletions
  1. +3
    -3
      dist/lesspass.min.js
  2. +7
    -3
      src/views/PasswordGenerator.vue

+ 3
- 3
dist/lesspass.min.js
File diff suppressed because it is too large
View File


+ 7
- 3
src/views/PasswordGenerator.vue View File

@@ -239,9 +239,6 @@
getSite(this.version).then(site => { getSite(this.version).then(site => {
if (site) { if (site) {
this.$store.commit('UPDATE_SITE', {site}); this.$store.commit('UPDATE_SITE', {site});
this.$refs.login.focus();
}else{
this.$refs.site.focus();
} }
}); });


@@ -255,6 +252,13 @@
} }
}); });
}, },
mounted(){
if (this.password.site) {
this.$refs.login.focus();
} else {
this.$refs.site.focus();
}
},
data(){ data(){
return { return {
masterPassword: '', masterPassword: '',


Loading…
Cancel
Save