From 924e5357795067bf6eb78f9ed3f4615ffaa1f5d4 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Wed, 5 Jun 2019 22:29:45 +0900 Subject: [Glitch] Scroll to compose form when focus Port 8f3c32e29cf13a84b2f0a58da0ab0c99a88caad5 to glitch-soc Signed-off-by: Thibaut Girka --- app/javascript/flavours/glitch/components/autosuggest_textarea.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours/glitch/components') diff --git a/app/javascript/flavours/glitch/components/autosuggest_textarea.js b/app/javascript/flavours/glitch/components/autosuggest_textarea.js index e1ded2b3a..cf3907fbf 100644 --- a/app/javascript/flavours/glitch/components/autosuggest_textarea.js +++ b/app/javascript/flavours/glitch/components/autosuggest_textarea.js @@ -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) => { -- cgit