diff --git a/src/components/advanced-search-form/advanced-search-form.jsx b/src/components/advanced-search-form/advanced-search-form.jsx index 346a0dd6..52e72537 100644 --- a/src/components/advanced-search-form/advanced-search-form.jsx +++ b/src/components/advanced-search-form/advanced-search-form.jsx @@ -78,9 +78,19 @@ export function AdvancedSearchForm() { browserHistory.push(`/search?q=${encodeURIComponent(resultingQuery)}`), ); + const onKeyDown = useEvent((e) => { + if ( + e.code === 'Enter' && + e.target.matches('input[type="text"], input[type="date"], input[type="search"]') + ) { + e.preventDefault(); + onSearch(); + } + }); + return ( -
+