# Discourse Retort

**URL:** https://meta.discourse.org/t/discourse-retort/35903
**Category:** Plugin
**Tags:** end-of-life
**Created:** [November 22, 2015, 11:53am UTC](https://meta.discourse.org/t/discourse-retort/35903 "2015-11-22T11:53:58Z")
**Posts on this page:** 1
**Showing post:** 161

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [September 15, 2017, 2:29am UTC](https://meta.discourse.org/t/discourse-retort/35903/161 "2017-09-15T02:29:54Z")

</div>

Yup, it is a hack only… The standard `EmojiPicker` in Discourse uses module-global variables to store the picker to popup. Any time the reply window is opened, it gets overwritten to point to a different emoji picker, throwing everything off.

I’ve opened an issue for this:

> [@EmojiPicker stores state in global module-level variables](https://meta.discourse.org/t/emojipicker-stores-state-in-global-module-level-variables/70056):
>
> In emoji-picker.js.es6: The following variables are used for emoji-pickers, but they are currently module-GLOBAL variables instead of instance fields. let $picker, $filter, $results, $list, scrollPosition, $visibleSections, \_checkTimeout; In particker, $picker is used to popup the emoji-picker. It is a module-global variable, so what that means is that there CANNOT BE any permanent emoji-picker’s on the page (e.g. discourse/babble and discourse/retort both put emoji-pickers permanently on th…

When the reply window is open, the variable points to the standard `EmojiPicker`. When you press the retort button, my fix forced-overwrite the variable to point to the `RetortEmojiPicker`. But if the reply window (and the standard `EmojiPicker`) is still open, obviously two emoji pickers together are going to make things _very_ interesting… especially when there is only _one_ module-global variable to point to one of them.

🕶

---

_[View the full topic](https://meta.discourse.org/t/discourse-retort/35903)._
