hackforla / food-oasis

Repository for the current redevelopment of the Food Oasis Los Angeles website
https://foodoasis.la
GNU General Public License v2.0
68 stars 51 forks source link

Bug: Entering an address into the location field and hitting ‘return' quickly breaks search #2129

Open fancyham opened 2 months ago

fancyham commented 2 months ago

Describe the bug

On the landing page and on the map screen, if you type in or paste an address and hit return (submit form) before the autocomplete appears, the search fails and user incorrectly gets “Sorry, we don’t have any results for this area”. Also note that the location field is blank again — ideally we should leave what they typed in the field, or display it in the error. image

The problem seems to be that the autocomplete doesn’t have a chance to respond.

Also, this problem also seems to happen if someone has a slight misspelling.

The user’s goal is to enter an address, and to get meaningful feedback when there is an error so that the can re-try or make a correction.

Steps to reproduce the issue

  1. Go to foodoasis.la
  2. Paste in an address and hit return immediately, as fast as possible (before autocomplete has a chance to respond)

What happens

You will see an error message that makes it look like we don’t have listings in that area, even if we actually do.

What's the expected result?

The accurate results for that address

Device configuration