diff --git a/src/frontend/src/Components/map/LocationSearch.js b/src/frontend/src/Components/map/LocationSearch.js index 617f1683..d0b11404 100644 --- a/src/frontend/src/Components/map/LocationSearch.js +++ b/src/frontend/src/Components/map/LocationSearch.js @@ -22,7 +22,9 @@ export default function LocationSearch(props) { const [options, setLocationOptions] = useState([]); const setSelectedLocation = payload => { - window.document.activeElement.blur(); // De-focus textbox + if (payload.length > 0) { + window.document.activeElement.blur(); // De-focus textbox + } dispatch(action(payload)); };