commit: 8fa1f0b50dcf51e976330163b819dfaf82d30a53
parent 296a6fa4e3d14f0c8ca091870fd4f7e85bc34df8
Author: Henry Jameson <me@hjkos.com>
Date: Mon, 10 Oct 2022 00:33:58 +0300
move keepOpen to picker
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/components/emoji_input/emoji_input.js b/src/components/emoji_input/emoji_input.js
@@ -116,7 +116,6 @@ const EmojiInput = {
focused: false,
blurTimeout: null,
temporarilyHideSuggestions: false,
- keepOpen: false,
disableClickOutside: false,
suggestions: [],
overlayStyle: {},
@@ -344,7 +343,6 @@ const EmojiInput = {
spaceAfter,
after
].join('')
- this.keepOpen = keepOpen
this.$emit('update:modelValue', newValue)
const position = this.caret + (insertion + spaceAfter + spaceBefore).length
if (!keepOpen) {
diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js
@@ -140,6 +140,9 @@ const EmojiPicker = {
},
onEmoji (emoji) {
const value = emoji.imageUrl ? `:${emoji.displayText}:` : emoji.replacement
+ if (!this.keepOpen) {
+ this.$refs.popover.hidePopover()
+ }
this.$emit('emoji', { insertion: value, keepOpen: this.keepOpen })
},
onScroll (e) {