Clear all action on amp-selector does not delete hidden fields
What's the issue?
Using events on a form’s amp-selector to clear another amp-selector’s values does clear the UI but the hidden fields remain uncleared and are submitted along with the form.
Basically, there are two amp-selectors in the form which are mutually exclusive to each other. So selecting one should be clearing the other. However in this case, as the video shows, clicking on each of the fields creates hidden input fields as part of the AMP runtime. Then clicking on the mutually exclusive selector which has an on:tap event to clear this selector shows the UI check boxes as being cleared. However, the hidden input fields continue to persist and get submitted along with the form.
How do we reproduce the issue?
A sample page where you can see this happening is here: https://mshishir1.herokuapp.com/shop/amp_selector_bug_1.html#development=1
This video captures the issue : https://www.youtube.com/watch?v=-5rOf3GRqOc
What browsers are affected?
All browsers
Which AMP version is affected?
Powered by AMP ⚡ HTML – Version 1522276799752 Likely existed in previous versions as well
The fix should be available in ~2 weeks. Thanks for letting us know about this bug!