Fix iOS autofocus bug, fixes #630
This commit is contained in:
parent
80110155bd
commit
4339378018
|
@ -166,8 +166,12 @@ class ComposeForm extends ImmutablePureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
const length = this.props.text.length;
|
||||||
document.addEventListener('click', this.handleClick, true);
|
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() {
|
componentWillUnmount() {
|
||||||
|
|
Loading…
Reference in New Issue