diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-12-02 09:31:12 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-12-02 09:31:12 -0500 |
commit | 101c74d8b82efb43ade6d67f669d586efc9b943c (patch) | |
tree | b80ff306a62b9ae31e53d2d609f5dc5b3efab779 /web/react/components/suggestion/suggestion_box.jsx | |
parent | 07f0df6af428a56a4abedde841a0813e2802cd2b (diff) | |
download | chat-101c74d8b82efb43ade6d67f669d586efc9b943c.tar.gz chat-101c74d8b82efb43ade6d67f669d586efc9b943c.tar.bz2 chat-101c74d8b82efb43ade6d67f669d586efc9b943c.zip |
Changed Command autocomplete to pick a suggestion when space is pressed
Diffstat (limited to 'web/react/components/suggestion/suggestion_box.jsx')
-rw-r--r-- | web/react/components/suggestion/suggestion_box.jsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/react/components/suggestion/suggestion_box.jsx b/web/react/components/suggestion/suggestion_box.jsx index d8493f92a..10e864b63 100644 --- a/web/react/components/suggestion/suggestion_box.jsx +++ b/web/react/components/suggestion/suggestion_box.jsx @@ -116,7 +116,7 @@ export default class SuggestionBox extends React.Component { } else if (e.which === KeyCodes.DOWN) { EventHelpers.emitSelectNextSuggestion(this.suggestionId); e.preventDefault(); - } else if (e.which === KeyCodes.SPACE || e.which === KeyCodes.ENTER) { + } else if (e.which === KeyCodes.ENTER || (e.which === KeyCodes.SPACE && SuggestionStore.shouldCompleteOnSpace(this.suggestionId))) { EventHelpers.emitCompleteWordSuggestion(this.suggestionId); e.preventDefault(); } else if (this.props.onKeyDown) { |