Closes #69
This commit is contained in:
parent
d1c6d0441b
commit
daa8157eb8
|
@ -9,7 +9,6 @@ import i18n from '../i18n';
|
|||
const toArray = body =>
|
||||
Array.isArray(body) ? body : [ body ];
|
||||
|
||||
|
||||
/**
|
||||
* The popup editor component.
|
||||
*
|
||||
|
|
|
@ -19,7 +19,7 @@ export default class Autocomplete extends Component {
|
|||
this.element.current.querySelector('input').value = this.props.initialValue;
|
||||
|
||||
if (this.props.focus)
|
||||
this.element.current.querySelector('input').focus();
|
||||
this.element.current.querySelector('input').focus({ preventScroll: true });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,8 +20,9 @@ export default class TextEntryField extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (this.props.focus && this.element.current)
|
||||
this.element.current.focus();
|
||||
if (this.props.focus && this.element.current) {
|
||||
this.element.current.focus({ preventScroll: true });
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
Loading…
Reference in New Issue