Select to view content in your preferred language

Bug: Search Widget submits form if inside form

3986
2
01-04-2022 09:16 AM
BatesRambow
Regular Contributor

This is similar to the issue identified and "solved" in this post: https://community.esri.com/t5/arcgis-api-for-javascript-questions/print-export-widget-bug-button-cli...

This is still an issue with the Search widget (and possibly others). Anytime these widgets are inside a form (for whatever reason) they attempt to submit that form when the buttons in the widget are clicked. It should be a simple fix by correctly assigning the proper HTML attributes (type="button") to the clear and submit buttons in the Search widget.

0 Kudos
2 Replies
Noah-Sager
Esri Regular Contributor

Hi @BatesRambow, thanks for posting your issue here. I am investigating this issue with the Search widget.

0 Kudos
Noah-Sager
Esri Regular Contributor

Hi @BatesRambow, we are working on having this fixed for the next release. Can you test with next and see if the issue is resolved in your workflow?

<script src="https://js.arcgis.com/next/"></script>

https://github.com/Esri/feedback-js-api-next

 

0 Kudos