alphagov / govuk-country-and-territory-autocomplete

An autocomplete widget that uses data from Country and Territory Register.
https://alphagov.github.io/govuk-country-and-territory-autocomplete/examples/
MIT License
38 stars 18 forks source link

Deleting country from input field does not reset select value #46

Closed Kerrzinga closed 5 years ago

Kerrzinga commented 6 years ago

To reproduce: On a form with the country picker, type "fr" into country picker, select "france", delete "france" from the input field, submit the form

Actual outcome The country value will be "france"

Expected outcome: The country value should be ""

nubz commented 5 years ago

We have just run into this issue too - there seems to be no handling of the change event when it's an empty string...

nubz commented 5 years ago

Actually this looks like it's an issue with accessible-autocomplete https://github.com/alphagov/accessible-autocomplete/issues/260

NickColley commented 5 years ago

Thanks for the spot @nubz closing this out here. :)