Hitting “escape” to close emoji picker in a discussion reply shouldn't clear reply
### Summary Originally noted in https://gitlab.com/gitlab-org/gitlab-ce/issues/40436 Hitting “escape” to close emoji autocomplete dropdown/picker in a discussion reply shouldn't clear reply. This happens in both issue and merge request discussions. ### Steps to reproduce 1. Visit an issue or merge request 1. Begin replying to a discussion (create a discussion before if there's none) 1. Type `:` to open the emoji picker 1. Press <kbd>esc</kbd> to close the emoji picker 1. (The discussion reply text area is closed, instead of only emoji picker) ### Example Project - Example issue: https://gitlab.com/pedroms/public-project/issues/2#note_48809698 - Example merge request: https://gitlab.com/pedroms/public-project/merge_requests/1#note_48809893 ### What is the current *bug* behavior? In a discussion reply (issue or merge request), if the user presses “escape” to close the emoji picker, the discussion reply is cleared. ### What is the expected *correct* behavior? In a discussion reply (issue or merge request), if the user presses “escape” to close the emoji picker, the emoji picker should close. If the user then presses “escape” again (with the emoji picker closed) the discussion reply should be cleared. ### Relevant logs and/or screenshots | Issue | Merge request | |---|---| | ![Nov-27-2017_11-27-02](/uploads/dfa57139cb376378d4a903e670448247/Nov-27-2017_11-27-02.gif) | ![Nov-27-2017_11-30-04](/uploads/20647c8230319113ff1b2d637fc10309/Nov-27-2017_11-30-04.gif) | ### Output of checks This bug happens on GitLab.com
issue