Fix iOS autofocus bug, fixes #630

This commit is contained in:
Alex Gleason 2021-05-02 15:30:29 -05:00
parent 80110155bd
commit 4339378018
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 5 additions and 1 deletions

View File

@ -166,8 +166,12 @@ class ComposeForm extends ImmutablePureComponent {
}
componentDidMount() {
const length = this.props.text.length;
document.addEventListener('click', this.handleClick, true);
this.setCursor(this.props.text.length); // Set cursor at end
if (length > 0) {
this.setCursor(length); // Set cursor at end
}
}
componentWillUnmount() {