fix(chat): only hide mentions list layer if it is visible in removeMentionsList (#787)

This commit is contained in:
ayn2op 2026-04-01 18:27:00 -04:00 • committed by GitHub
parent 48f3b5316c
commit adda09d1ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -613,7 +613,10 @@ func (mi *messageInput) addMentionUser(user *discord.User) {
}
func (mi *messageInput) removeMentionsList() {
mi.chat.HideLayer(mentionsListLayerName)
// Make sure that the layer is visible before hiding it to avoid a refocus in the parent.
if mi.chat.GetVisible(mentionsListLayerName) {
mi.chat.HideLayer(mentionsListLayerName)
}
}
func (mi *messageInput) stopTabCompletion(emit func(tview.Command)) {