From 8042b880bdca694b092675f3d3a83a92234678a3 Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Mon, 20 Aug 2018 21:38:38 +0900
Subject: [PATCH] refs #537 Focus on new toot modal after change account
---
.../components/TimelineSpace/Modals/NewToot/Status.vue | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/renderer/components/TimelineSpace/Modals/NewToot/Status.vue b/src/renderer/components/TimelineSpace/Modals/NewToot/Status.vue
index c2639f5e..228c55d9 100644
--- a/src/renderer/components/TimelineSpace/Modals/NewToot/Status.vue
+++ b/src/renderer/components/TimelineSpace/Modals/NewToot/Status.vue
@@ -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) {