diff options
| author | taehoon <th.dev91@gmail.com> | 2019-09-19 13:52:54 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-09-20 11:29:27 -0400 |
| commit | 0c8038d4f610bd7260b920e6fb55a8ea0341d291 (patch) | |
| tree | 3de599b4821df93fa9715c5deffa122c3edb29e6 /src | |
| parent | a9f33272a860fd95def54c7dafa863056324122d (diff) | |
recover autofocusing behavior
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/post_status_modal/post_status_modal.js | 7 |
1 files changed, 7 insertions, 0 deletions
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') |
