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