From a8280917fbf25e214af689fb1754c4d25458ffb0 Mon Sep 17 00:00:00 2001 From: Vicky Lai Date: Thu, 21 Sep 2017 12:53:42 -0700 Subject: [PATCH] Allow autoFocus on Autocomplete component --- components/autocomplete/Autocomplete.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/autocomplete/Autocomplete.js b/components/autocomplete/Autocomplete.js index 099a0337..fa792ac6 100644 --- a/components/autocomplete/Autocomplete.js +++ b/components/autocomplete/Autocomplete.js @@ -132,7 +132,7 @@ const factory = (Chip, Input) => { }; handleQueryFocus = (event) => { - this.suggestionsNode.scrollTop = 0; + event.target.scrollTop = 0; this.setState({ active: '', focus: true }); if (this.props.onFocus) this.props.onFocus(event); }; @@ -375,7 +375,6 @@ const factory = (Chip, Input) => { return (