From 2ee8051cafe2a121fdbc5f669de22d30e2d84c2e Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 6 May 2016 11:24:31 -0400 Subject: Made SuggestionBox clear suggestions on escape (#2909) --- webapp/components/suggestion/suggestion_box.jsx | 2 ++ 1 file changed, 2 insertions(+) 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); } -- cgit v1.2.3-1-g7c22