Just visit the page, where I placed mutation observer to the button rendered by Select component
It shows alert that the button's "type" attribute changed from null to "button"
Current behavior 😯
A button is initially rendered as Select without type attribute, and then gets rerendered right after that. When the component can be clicked before it, it can result in submitting a form which is unexpected.
Expected behavior 🤔
A button should always be rendered with type="button"
Context 🔦
My end-to-end tests with Cypress fail due to submitting form when the test wants to select an option
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/p/sandbox/elastic-dew-gslwht?file=%2Fsrc%2FApp.js%3A4%2C32&utm_source=dotnew
Steps:
Select
componentCurrent behavior 😯
A button is initially rendered as Select without
type
attribute, and then gets rerendered right after that. When the component can be clicked before it, it can result in submitting a form which is unexpected.Expected behavior 🤔
A button should always be rendered with
type="button"
Context 🔦
My end-to-end tests with Cypress fail due to submitting form when the test wants to select an option
Your environment 🌎
Chrome
(see codesandbox for library versions)