mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Revert "autoscroll emoji suggestions box"
This reverts commit c89cce0219
.
This commit is contained in:
parent
8a24ad5828
commit
06e299cef5
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user