Focus on enter
parent
1c7709bdd4
commit
d436eaed80
|
@ -44,11 +44,17 @@ export default class PickerMenu extends Picker
|
|||
this.focus();
|
||||
}
|
||||
}
|
||||
else if ((ev.which == 10 || ev.which == 13) && this.state.active != null &&
|
||||
this.state.active < this.props.items.length)
|
||||
else if (ev.which == 10 || ev.which == 13)
|
||||
{
|
||||
// enter
|
||||
this.onMouseDown();
|
||||
if (!this.state.focused)
|
||||
{
|
||||
this.focus();
|
||||
}
|
||||
else if (this.state.active != null && this.state.active < this.props.items.length)
|
||||
{
|
||||
this.onMouseDown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue