Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Added tab press to select autocomplete
Browse files Browse the repository at this point in the history
Resovles #7132

Auditors: @srirambv @bsclifton

Test Plan:
- Ensure you have auto complete suggestion for on an input filed
- Press down on the input field to highlight the suggestion
- Once highlighted press tab, field should be filled
  • Loading branch information
NejcZdovc committed Feb 8, 2017
1 parent f7a5e17 commit ed34cd7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/components/contextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,11 @@ class ContextMenu extends ImmutableComponent {

switch (e.keyCode) {
case keyCodes.ENTER:
e.preventDefault()
case KeyCodes.TAB:
if (e.keyCode === keyCodes.ENTER) {
e.preventDefault()
}

e.stopPropagation()
if (currentIndex !== null) {
const action = selectedTemplate.getIn([currentIndex, 'click'])
Expand All @@ -288,7 +292,6 @@ class ContextMenu extends ImmutableComponent {
break

case KeyCodes.ESC:
case KeyCodes.TAB:
windowActions.resetMenuState()
break

Expand Down

0 comments on commit ed34cd7

Please sign in to comment.