summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-05-06 11:24:31 -0400
committerCorey Hulen <corey@hulen.com>2016-05-06 08:24:31 -0700
commit2ee8051cafe2a121fdbc5f669de22d30e2d84c2e (patch)
tree271cc69e0fbf2faf24df6c3913fb499fb7db3fde /webapp
parente0378c0a13e00902cec7b005ff08ec5814e726e1 (diff)
downloadchat-2ee8051cafe2a121fdbc5f669de22d30e2d84c2e.tar.gz
chat-2ee8051cafe2a121fdbc5f669de22d30e2d84c2e.tar.bz2
chat-2ee8051cafe2a121fdbc5f669de22d30e2d84c2e.zip
Made SuggestionBox clear suggestions on escape (#2909)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/suggestion/suggestion_box.jsx2
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);
}