diff options
author | Corey Hulen <corey@hulen.com> | 2015-12-04 15:32:52 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-12-04 15:32:52 -0800 |
commit | 564e9b72c27bd67ac4d59e758c6d56100651a7b5 (patch) | |
tree | fdd249c40dc5cde17ef8a9e5c729376081ffb0ab /web/react/components/suggestion/suggestion_box.jsx | |
parent | d334ea1df40bf17624ae160174d3727ad969327d (diff) | |
parent | 896b401a195deb6fd724e608812b6a9d4b9dc24b (diff) | |
download | chat-564e9b72c27bd67ac4d59e758c6d56100651a7b5.tar.gz chat-564e9b72c27bd67ac4d59e758c6d56100651a7b5.tar.bz2 chat-564e9b72c27bd67ac4d59e758c6d56100651a7b5.zip |
Merge pull request #1630 from florianorben/autocomplete-on-tab
autocomplete component should enter suggestions on 'tab'
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 4cfb38f8e..ad8ad1e9e 100644 --- a/web/react/components/suggestion/suggestion_box.jsx +++ b/web/react/components/suggestion/suggestion_box.jsx @@ -94,7 +94,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.ENTER || (e.which === KeyCodes.SPACE && SuggestionStore.shouldCompleteOnSpace(this.suggestionId))) { + } else if (e.which === KeyCodes.ENTER || e.which === KeyCodes.TAB || (e.which === KeyCodes.SPACE && SuggestionStore.shouldCompleteOnSpace(this.suggestionId))) { EventHelpers.emitCompleteWordSuggestion(this.suggestionId); e.preventDefault(); } else if (this.props.onKeyDown) { |