GA-MO / react-confirm-alert

react component confirm dialog.
https://ga-mo.github.io/react-confirm-alert/demo/
MIT License
272 stars 105 forks source link

Unable setup tab Index to Confirm/Cancel button on opening #29

Open AbhaysinghBhosale opened 5 years ago

AbhaysinghBhosale commented 5 years ago

Have used react-confirm-alert package in my project and want users to use most of the functionalities using the keyboard only.

When users click on save button we shows then confirm dialogue but this need to be click on Confirm button using mouse and users are unable to use the keyboard.

Please can anyone let me know the any props and other solution available to solve this issue and set tab Index for the buttons in confirm box

GA-MO commented 5 years ago

@AbhaysinghBhosale Did you have the solution to fix this yet?

AbhaysinghBhosale commented 5 years ago

there is not any solution from the library but i have managed it by adding "autoFocus="true"" attribute to the confirm button. So not confirm button can be pressed by Enter key