You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the geocoder div is within a form and .geocoder-icon-close button clicked or user hits return after selecting a suggestion from keyboard, the form is submitted.
I confirmed this by taking the example code from here and adding a wrapping form around div.map and div.geocoder-container. Then I entered an address with suggestions and clicked the "x" (aka button.geocoder-icon-close). The form was submitted rather than simply clearing the input value.
I then also repeated the test, but instead of clicking the "x", I arrowed down to select a suggestion and clicked return. The form was also submitted.
This was in Safari, Chrome, and Firefox.
The mapbox-gl-geocoder is really handy! Thanks for all your great work. Just a little detail that would be great to fix or have insight about how to eliminate the behavior.
The text was updated successfully, but these errors were encountered:
When the geocoder div is within a form and
.geocoder-icon-close
button clicked or user hits return after selecting a suggestion from keyboard, the form is submitted.I confirmed this by taking the example code from here and adding a wrapping form around
div.map
anddiv.geocoder-container
. Then I entered an address with suggestions and clicked the "x" (akabutton.geocoder-icon-close
). The form was submitted rather than simply clearing the input value.I then also repeated the test, but instead of clicking the "x", I arrowed down to select a suggestion and clicked return. The form was also submitted.
This was in Safari, Chrome, and Firefox.
The mapbox-gl-geocoder is really handy! Thanks for all your great work. Just a little detail that would be great to fix or have insight about how to eliminate the behavior.
The text was updated successfully, but these errors were encountered: