diff options
| author | Shpuld Shpludson <shp@cock.li> | 2021-02-28 15:37:39 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2021-02-28 15:37:39 +0000 |
| commit | 91f93d4a55cbf927a6adee35dc184b09d1f9b75d (patch) | |
| tree | 882fb179fa7ed36e6c212a4874559b27a73f3d1e /src/components/emoji_input/emoji_input.js | |
| parent | 670abd633f97e75cf35981ee0f617d0be1b43816 (diff) | |
| parent | b4782ad159026e3fb50c476e5cf9d89176e441f4 (diff) | |
Merge branch 'develop' into 'feat/timeline-quick-settings'
# Conflicts:
# CHANGELOG.md
Diffstat (limited to 'src/components/emoji_input/emoji_input.js')
| -rw-r--r-- | src/components/emoji_input/emoji_input.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/components/emoji_input/emoji_input.js b/src/components/emoji_input/emoji_input.js index 2068a598..dc03bc9f 100644 --- a/src/components/emoji_input/emoji_input.js +++ b/src/components/emoji_input/emoji_input.js @@ -194,11 +194,18 @@ const EmojiInput = { } }, methods: { + focusPickerInput () { + const pickerEl = this.$refs.picker.$el + if (!pickerEl) return + const pickerInput = pickerEl.querySelector('input') + if (pickerInput) pickerInput.focus() + }, triggerShowPicker () { this.showPicker = true this.$refs.picker.startEmojiLoad() this.$nextTick(() => { this.scrollIntoView() + this.focusPickerInput() }) // This temporarily disables "click outside" handler // since external trigger also means click originates @@ -214,6 +221,7 @@ const EmojiInput = { if (this.showPicker) { this.scrollIntoView() this.$refs.picker.startEmojiLoad() + this.$nextTick(this.focusPickerInput) } }, replace (replacement) { |
