Adding an issue reaction breaks adding comment reactions

Summary

After adding an emoji reaction to an issue, the selector for adding a reaction to a comment doesn't show up at all or gets immediately closed. When trying to undo the issue reaction after the (unsuccessful) comment reaction, the original reaction gets applied to the comment.

This can be worked around by reloading the page.

Steps to reproduce

I tried this in Safari and Chrome. It is not 100 % reproducible, but happens sufficiently often (> 50 % of all cases).

  1. Open an issue and add a reaction (e.g. "Thumbs up")
  2. Click the "Add reaction" button for a comment. The reaction selector should close immediately or not open at all. Otherwise, remove the issue reaction, reload the page and try again.
  3. Click the button for the original reaction (i.e. try to undo it). This reaction should now get applied to the comment.

What is the expected correct behavior?

Adding a reaction to a comment should work flawlessly even after adding an issue reaction.

Relevant logs and/or screenshots

Animated GIF demonstrating the issue

GitLab environment info

Reproduced on GitLab.com as well as on a self-hosted GitLab CE 10.7.3 instance.