Scroll to compose form when focus (#10970)
* Scroll to compose form when focus * Get rid of constructor
This commit is contained in:
parent
cac9110533
commit
8f3c32e29c
2 changed files with 14 additions and 2 deletions
|
@ -138,8 +138,11 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
|
|||
this.setState({ suggestionsHidden: true, focused: false });
|
||||
}
|
||||
|
||||
onFocus = () => {
|
||||
onFocus = (e) => {
|
||||
this.setState({ focused: true });
|
||||
if (this.props.onFocus) {
|
||||
this.props.onFocus(e);
|
||||
}
|
||||
}
|
||||
|
||||
onSuggestionClick = (e) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue