refs #537 Focus on new toot modal after change account
This commit is contained in:
parent
a5c49a7ccd
commit
8042b880bd
@ -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…
x
Reference in New Issue
Block a user