Merge pull request #539 from h3poteto/iss-537
closes #537 Focus on new toot modal after change account
This commit is contained in:
commit
9c16775606
|
@ -71,10 +71,16 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// When change account, the new toot modal is recreated.
|
||||
// So can not catch open event in watch.
|
||||
this.$refs.status.focus()
|
||||
},
|
||||
watch: {
|
||||
opened: function (newState, oldState) {
|
||||
if (!oldState && newState) {
|
||||
this.$nextTick(function () {
|
||||
console.log('focus')
|
||||
this.$refs.status.focus()
|
||||
})
|
||||
} else if (oldState && !newState) {
|
||||
|
|
Loading…
Reference in New Issue