I'm using React
and Ant Design
.
I have a popover with a button. When the user clicks the button, it shows the modal with an input field.
Problem
When I click the Show Modal Button auto focus is not working and also popover is not hiding
I tried with HTML5 autoFocus
<textarea autoFocus></textarea>
But it did not work, here the code: stackblitz
Add autoFocus={false} to your modal to reject the modal's focus management.
<Modal ... autoFocus={false}>
<textarea autoFocus={true}>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With