Skip to content

Commit 024024c

Browse files
committed
(fix) emojis autocomplete update
1 parent cb06c7a commit 024024c

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

src/lib/Room/Room.vue

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,10 @@ export default {
558558
}
559559
}
560560
561-
this.updateFooterList('@')
562-
this.updateFooterList(':')
561+
setTimeout(() => {
562+
this.updateFooterList('@')
563+
this.updateFooterList(':')
564+
}, 60)
563565
}),
564566
50
565567
)
@@ -709,7 +711,7 @@ export default {
709711
this.updateShowUsersTag(query)
710712
}
711713
} else {
712-
this.resetFooterList()
714+
this.resetFooterList(tagChar)
713715
}
714716
},
715717
getCharPosition(tagChar) {
@@ -774,9 +776,16 @@ export default {
774776
position + user.username.length + space.length + 1
775777
this.focusTextarea()
776778
},
777-
resetFooterList() {
778-
this.filteredEmojis = []
779-
this.filteredUsersTag = []
779+
resetFooterList(tagChar = null) {
780+
if (tagChar === ':') {
781+
this.filteredEmojis = []
782+
} else if (tagChar === '@') {
783+
this.filteredUsersTag = []
784+
} else {
785+
this.filteredEmojis = []
786+
this.filteredUsersTag = []
787+
}
788+
780789
this.textareaCursorPosition = null
781790
},
782791
onMediaLoad() {

0 commit comments

Comments
 (0)