]> cat aescling's git repositories - mastodon.git/commitdiff
Revert "autoscroll emoji suggestions box"
authorOndřej Hruška <ondra@ondrovo.com>
Thu, 28 Sep 2017 06:56:32 +0000 (08:56 +0200)
committerOndřej Hruška <ondra@ondrovo.com>
Thu, 28 Sep 2017 06:56:32 +0000 (08:56 +0200)
This reverts commit c89cce0219646502b4d338213d112a528373bdc4.

app/javascript/mastodon/components/autosuggest_textarea.js

index 82a10687f558f0b3003b5da39ccaed61b9f37560..35b37600fe540567c44a90428688929c8207440c 100644 (file)
@@ -151,15 +151,6 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
     }
   }
 
-  componentDidUpdate () {
-    if (this.refs.selected) {
-      if (this.refs.selected.scrollIntoViewIfNeeded)
-        this.refs.selected.scrollIntoViewIfNeeded();
-      else
-        this.refs.selected.scrollIntoView({ behavior: 'auto', block: 'nearest' });
-    }
-  }
-
   render () {
     const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus } = this.props;
     const { suggestionsHidden, selectedSuggestion } = this.state;
@@ -192,7 +183,6 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
         <div className={`autosuggest-textarea__suggestions ${suggestionsHidden || suggestions.isEmpty() ? '' : 'autosuggest-textarea__suggestions--visible'}`}>
           {suggestions.map((suggestion, i) => (
             <div
-              ref={i === selectedSuggestion ? 'selected' : null}
               role='button'
               tabIndex='0'
               key={suggestion}
This page took 0.022698 seconds and 3 git commands to generate.