backspace also triggers menu
This commit is contained in:
parent
64ab7937e9
commit
003867d773
@ -158,9 +158,6 @@ class FindBar extends Component {
|
||||
handleKeyDown(event) {
|
||||
let highlightedIndex, index;
|
||||
switch (event.key) {
|
||||
case 'Backspace':
|
||||
this.maybeRemoveActiveScope();
|
||||
break;
|
||||
case 'ArrowDown':
|
||||
event.preventDefault();
|
||||
highlightedIndex = this.state.highlightedIndex;
|
||||
@ -210,6 +207,12 @@ class FindBar extends Component {
|
||||
isOpen: false
|
||||
}, this.maybeRemoveActiveScope);
|
||||
break;
|
||||
case 'Backspace':
|
||||
this.setState({
|
||||
highlightedIndex: 0,
|
||||
isOpen: true
|
||||
}, this.maybeRemoveActiveScope);
|
||||
break;
|
||||
default:
|
||||
this.setState({
|
||||
highlightedIndex: 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user