This commit is contained in:
Rainer Simon 2021-07-05 21:18:08 +02:00
parent d1c6d0441b
commit daa8157eb8
3 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,6 @@ import i18n from '../i18n';
const toArray = body =>
Array.isArray(body) ? body : [ body ];
/**
* The popup editor component.
*

View File

@ -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 });
}
}

View File

@ -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() {