move keepOpen to picker
This commit is contained in:
parent
296a6fa4e3
commit
8fa1f0b50d
|
@ -116,7 +116,6 @@ const EmojiInput = {
|
||||||
focused: false,
|
focused: false,
|
||||||
blurTimeout: null,
|
blurTimeout: null,
|
||||||
temporarilyHideSuggestions: false,
|
temporarilyHideSuggestions: false,
|
||||||
keepOpen: false,
|
|
||||||
disableClickOutside: false,
|
disableClickOutside: false,
|
||||||
suggestions: [],
|
suggestions: [],
|
||||||
overlayStyle: {},
|
overlayStyle: {},
|
||||||
|
@ -344,7 +343,6 @@ const EmojiInput = {
|
||||||
spaceAfter,
|
spaceAfter,
|
||||||
after
|
after
|
||||||
].join('')
|
].join('')
|
||||||
this.keepOpen = keepOpen
|
|
||||||
this.$emit('update:modelValue', newValue)
|
this.$emit('update:modelValue', newValue)
|
||||||
const position = this.caret + (insertion + spaceAfter + spaceBefore).length
|
const position = this.caret + (insertion + spaceAfter + spaceBefore).length
|
||||||
if (!keepOpen) {
|
if (!keepOpen) {
|
||||||
|
|
|
@ -140,6 +140,9 @@ const EmojiPicker = {
|
||||||
},
|
},
|
||||||
onEmoji (emoji) {
|
onEmoji (emoji) {
|
||||||
const value = emoji.imageUrl ? `:${emoji.displayText}:` : emoji.replacement
|
const value = emoji.imageUrl ? `:${emoji.displayText}:` : emoji.replacement
|
||||||
|
if (!this.keepOpen) {
|
||||||
|
this.$refs.popover.hidePopover()
|
||||||
|
}
|
||||||
this.$emit('emoji', { insertion: value, keepOpen: this.keepOpen })
|
this.$emit('emoji', { insertion: value, keepOpen: this.keepOpen })
|
||||||
},
|
},
|
||||||
onScroll (e) {
|
onScroll (e) {
|
||||||
|
|
Loading…
Reference in a new issue