diff options
| author | Shpuld Shpuldson <shp@cock.li> | 2021-02-25 17:27:29 +0200 |
|---|---|---|
| committer | Shpuld Shpuldson <shp@cock.li> | 2021-02-25 17:27:29 +0200 |
| commit | 34d18ac0c4e1903cb174df8957b855a048ec6b7e (patch) | |
| tree | 914a68fe52b7693d90ac298e9a2539d1af8050bd /src/components/react_button | |
| parent | 5faca01261a3babe9eab982a69404386875d596b (diff) | |
focus input in emoji picker and react picker
Diffstat (limited to 'src/components/react_button')
| -rw-r--r-- | src/components/react_button/react_button.js | 6 | ||||
| -rw-r--r-- | src/components/react_button/react_button.vue | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js index 5e7b7580..ce82c90d 100644 --- a/src/components/react_button/react_button.js +++ b/src/components/react_button/react_button.js @@ -23,6 +23,12 @@ const ReactButton = { this.$store.dispatch('reactWithEmoji', { id: this.status.id, emoji }) } close() + }, + focusInput () { + this.$nextTick(() => { + const input = this.$el.querySelector('input') + if (input) input.focus() + }) } }, computed: { diff --git a/src/components/react_button/react_button.vue b/src/components/react_button/react_button.vue index 04734674..4839024c 100644 --- a/src/components/react_button/react_button.vue +++ b/src/components/react_button/react_button.vue @@ -6,6 +6,7 @@ :offset="{ y: 5 }" :bound-to="{ x: 'container' }" remove-padding + @show="focusInput" > <div slot="content" |
