Correctly autofocus on poll input

code-quality
Justin 2022-06-14 13:52:08 -04:00
rodzic f211792085
commit fe9ce637e8
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -7,7 +7,7 @@ import AutosuggestInput from 'soapbox/components/autosuggest_input';
import { Button, Divider, HStack, Stack, Text, Toggle } from 'soapbox/components/ui';
import { useAppSelector } from 'soapbox/hooks';
import DurationSelector from './polls/duration-selector';
import DurationSelector from './duration-selector';
import type { AutoSuggestion } from 'soapbox/components/autosuggest_input';
@ -94,7 +94,7 @@ const Option = (props: IOption) => {
onSuggestionsClearRequested={onSuggestionsClearRequested}
onSuggestionSelected={onSuggestionSelected}
searchTokens={[':']}
autoFocus={index === 0}
autoFocus={index === 0 || index >= 2}
/>
</HStack>

Wyświetl plik

@ -10,7 +10,7 @@ import {
fetchComposeSuggestions,
selectComposeSuggestion,
} from '../../../actions/compose';
import PollForm from '../components/poll-form';
import PollForm from '../components/polls/poll-form';
const mapStateToProps = state => ({
suggestions: state.getIn(['compose', 'suggestions']),