FIX: ensures we close modal on reaction (#26745)

It's important to close the modal or we will just remove it from screen without calling callbacks, which will cause the body to be locked on iOS.

It's hard to test this behavior, as it only happens on iOS and the modal will disappear anyways, it's only a matter of ensuring it's closed correctly.
This commit is contained in:
Joffrey JAFFEUX 2024-04-24 19:06:11 +02:00 committed by GitHub
parent be96295c25
commit 2bab1df461
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -63,6 +63,12 @@ export default class ChatMessageActionsMobile extends Component {
this.messageInteractor[fnId]();
}
@action
react(name, operation) {
this.args.closeModal();
this.messageInteractor.react(name, operation);
}
@action
openEmojiPicker(_, event) {
this.args.closeModal();
@ -115,7 +121,7 @@ export default class ChatMessageActionsMobile extends Component {
{{#each this.messageInteractor.emojiReactions as |reaction|}}
<ChatMessageReaction
@reaction={{reaction}}
@onReaction={{this.messageInteractor.react}}
@onReaction={{this.react}}
@message={{this.message}}
@showCount={{false}}
/>