forked from AkkomaGang/akkoma-fe
reset position when reopening emoji picker
This commit is contained in:
parent
a69946923b
commit
23137dfd4b
1 changed files with 3 additions and 1 deletions
|
@ -109,6 +109,9 @@ const EmojiPicker = {
|
|||
this.customEmojiBufferSlice += LOAD_EMOJI_BY
|
||||
},
|
||||
startEmojiLoad (forceUpdate = false) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['emoji-groups'].scrollTop = 0
|
||||
})
|
||||
const bufferSize = this.customEmojiBuffer.length
|
||||
const bufferPrefilledAll = bufferSize === this.filteredEmoji.length
|
||||
if (bufferPrefilledAll && !forceUpdate) {
|
||||
|
@ -126,7 +129,6 @@ const EmojiPicker = {
|
|||
watch: {
|
||||
keyword () {
|
||||
this.customEmojiLoadAllConfirmed = false
|
||||
this.$refs['emoji-groups'].scrollTop = 0
|
||||
this.onScroll()
|
||||
this.startEmojiLoad(true)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue