Focus popup menus
parent
50d82f6fd4
commit
aec8525a5b
|
@ -80,6 +80,10 @@ export default class PickerMenu extends Picker
|
|||
{
|
||||
if (e)
|
||||
{
|
||||
if (!this.renderInput)
|
||||
{
|
||||
e.focus();
|
||||
}
|
||||
e.style.visibility = 'hidden';
|
||||
e.style.overflowY = 'hidden';
|
||||
const anim = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame;
|
||||
|
@ -101,7 +105,9 @@ export default class PickerMenu extends Picker
|
|||
{
|
||||
const theme = this.props.theme || autocomplete_css;
|
||||
return (<div ref={this.animatePicker}
|
||||
tabIndex={!this.props.renderInput ? 1 : undefined}
|
||||
className={theme.suggestions}
|
||||
onKeyDown={this.onKeyDown}
|
||||
onMouseOver={this.onMouseOver}>
|
||||
{this.props.beforeItems}
|
||||
{this.props.items.map((e, i) => (<div key={i} id={i} onMouseDown={this.onMouseDown}
|
||||
|
|
Loading…
Reference in New Issue