From 0c8038d4f610bd7260b920e6fb55a8ea0341d291 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Thu, 19 Sep 2019 13:52:54 -0400
Subject: [PATCH] recover autofocusing behavior
---
src/components/post_status_modal/post_status_modal.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/components/post_status_modal/post_status_modal.js b/src/components/post_status_modal/post_status_modal.js
index 86a4e1d8..15783642 100644
--- a/src/components/post_status_modal/post_status_modal.js
+++ b/src/components/post_status_modal/post_status_modal.js
@@ -15,6 +15,13 @@ const PostStatusModal = {
return this.$store.state.postStatus.params
}
},
+ watch: {
+ isOpen (val) {
+ if (val) {
+ this.$nextTick(() => this.$el.querySelector('textarea').focus())
+ }
+ }
+ },
methods: {
closeModal () {
this.$store.dispatch('closePostStatusModal')