Merge pull request #1630 from florianorben/autocomplete-on-tab
autocomplete component should enter suggestions on 'tab'
Этот коммит содержится в:
@@ -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) {
|
||||
|
||||
@@ -391,7 +391,8 @@ export default {
|
||||
BACKSPACE: 8,
|
||||
ENTER: 13,
|
||||
ESCAPE: 27,
|
||||
SPACE: 32
|
||||
SPACE: 32,
|
||||
TAB: 9
|
||||
},
|
||||
HighlightedLanguages: {
|
||||
diff: 'Diff',
|
||||
|
||||
Ссылка в новой задаче
Block a user