FIX: ensures non existing user/group cards are not stuck (#20195)

Prior to this fix on mobile the card-cloak would not get removed if the user/group card was leading to a non existing user/group.

The fix ensures hidden class is removed each time we call show.
This commit is contained in:
Joffrey JAFFEUX 2023-02-07 15:36:30 +01:00 committed by GitHub
parent 7482b0f703
commit 9b0b60274a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -81,6 +81,7 @@ export default Mixin.create({
post, post,
}); });
document.querySelector(".card-cloak")?.classList.remove("hidden");
this.appEvents.trigger("user-card:show", { username }); this.appEvents.trigger("user-card:show", { username });
this._showCallback(username, $(target)).then((user) => { this._showCallback(username, $(target)).then((user) => {
this.appEvents.trigger("user-card:after-show", { user }); this.appEvents.trigger("user-card:after-show", { user });
@ -217,7 +218,6 @@ export default Mixin.create({
], ],
}); });
} else { } else {
document.querySelector(".card-cloak")?.classList.remove("hidden");
this._popperReference = createPopper(target[0], this.element, { this._popperReference = createPopper(target[0], this.element, {
modifiers: [ modifiers: [
{ name: "eventListeners", enabled: false }, { name: "eventListeners", enabled: false },