diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-05-06 11:24:31 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-05-06 08:24:31 -0700 |
commit | 2ee8051cafe2a121fdbc5f669de22d30e2d84c2e (patch) | |
tree | 271cc69e0fbf2faf24df6c3913fb499fb7db3fde /webapp/components | |
parent | e0378c0a13e00902cec7b005ff08ec5814e726e1 (diff) | |
download | chat-2ee8051cafe2a121fdbc5f669de22d30e2d84c2e.tar.gz chat-2ee8051cafe2a121fdbc5f669de22d30e2d84c2e.tar.bz2 chat-2ee8051cafe2a121fdbc5f669de22d30e2d84c2e.zip |
Made SuggestionBox clear suggestions on escape (#2909)
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/suggestion/suggestion_box.jsx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/webapp/components/suggestion/suggestion_box.jsx b/webapp/components/suggestion/suggestion_box.jsx index dbec024ac..998c17340 100644 --- a/webapp/components/suggestion/suggestion_box.jsx +++ b/webapp/components/suggestion/suggestion_box.jsx @@ -110,6 +110,8 @@ export default class SuggestionBox extends React.Component { } else if (e.which === KeyCodes.ENTER || e.which === KeyCodes.TAB) { GlobalActions.emitCompleteWordSuggestion(this.suggestionId); e.preventDefault(); + } else if (e.which === KeyCodes.ESCAPE) { + GlobalActions.emitClearSuggestions(this.suggestionId); } else if (this.props.onKeyDown) { this.props.onKeyDown(e); } |