During async API calls, we disable form controls.
Since disabled form controls cannot receive focus, the focus is lost.
When users are submitting the form using the submit button, this does not create any issue because the element does not actually disable the inner
When users are submitting the form by pressing enter within a form control, this creates an issue because focus goes nowhere, it is lost.
We may need to consider the same solution as with the cc-button component and go for aria-disabled + make the form control unresponsive but this is trickier than with the cc-button because there are more interactions to disable.
Note: I forgot to specify that this issue depends on the browser used to reproduce because not all of them makes disabled form control unfocusable :upside_down_face:
Context
During async API calls, we disable form controls. Since disabled form controls cannot receive focus, the focus is lost.
When users are submitting the form using the submit button, this does not create any issue because the element does not actually disable the inner
When users are submitting the form by pressing enter within a form control, this creates an issue because focus goes nowhere, it is lost.
We may need to consider the same solution as with the
cc-button
component and go foraria-disabled
+ make the form control unresponsive but this is trickier than with thecc-button
because there are more interactions to disable.