diff --git a/src/components/SearchBar/index.tsx b/src/components/SearchBar/index.tsx index 60b7614..e571e01 100644 --- a/src/components/SearchBar/index.tsx +++ b/src/components/SearchBar/index.tsx @@ -8,7 +8,7 @@ const SearchBar: React.FC = () => { const history = useHistory(); const search = (event: React.KeyboardEvent) => { - if (event.key === 'Enter' && query !== '') { + if ((event.key === 'Enter' || event.keyCode === 13) && query !== '') { history.push(`/search/${query}`); setQuery(''); } @@ -19,7 +19,7 @@ const SearchBar: React.FC = () => { ) => setQuery(event.target.value)} /> Search icon diff --git a/src/components/SearchBar/styles.ts b/src/components/SearchBar/styles.ts index 596e60d..1d43c66 100644 --- a/src/components/SearchBar/styles.ts +++ b/src/components/SearchBar/styles.ts @@ -16,6 +16,7 @@ export const Input = styled.input` border: none; border-radius: 5px; overflow: hidden; + user-select: text !important; &::placeholder { color: rgba(0, 0, 0, 0.5);