From 177f92f9524d9d09bbdbf238fa0c1b0df31d9d36 Mon Sep 17 00:00:00 2001 From: Tyrel Narciso Date: Fri, 26 Apr 2024 12:46:23 -0700 Subject: [PATCH] DBC22-1399: created check for payload length to perserve editing --- src/frontend/src/Components/map/LocationSearch.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); };