omnibox: fix autofocus on safari

This commit is contained in:
Matilde Park 2020-07-30 21:02:10 -04:00
parent 7d1c53ea44
commit 8230b02ad3

View File

@ -32,6 +32,8 @@ export class Omnibox extends Component {
if (prevProps && this.props.show && prevProps.show !== this.props.show) {
Mousetrap.bind('escape', () => this.props.api.local.setOmnibox());
document.addEventListener('mousedown', this.handleClickOutside);
const touchstart = new Event('touchstart');
this.input.dispatchEvent(touchstart);
this.input.focus();
}
}