Reactions menu displaying outside of post action undo window (mobile)

I could not find in history what could be a regression.

There is a check for the click in toggleFromButton:

https://github.com/discourse/discourse-reactions/blob/main/assets/javascripts/discourse/widgets/discourse-reactions-actions.js#L430-L435

But not for the touch:
https://github.com/discourse/discourse-reactions/blob/main/assets/javascripts/discourse/widgets/discourse-reactions-actions.js#L170-L183

I guess you could do the following not to open the reactions list:

  touchStart() {
    cancel(this._touchTimeout);
    if (this.capabilities.touch) {
      if (
        this.attrs.post.current_user_reaction &&
        !this.attrs.post.current_user_reaction.can_undo
      ) {
        return false;
      }
      ...
}
3 Likes