HI Guys,
Was hopping to get some help with a problem I am having trying to set focus to an element.
So let me give you some background, I have modal window and if the users decides to close it, the focus should go back to the element used in the first place to open it. (This is for accessibility).
So currently I tried to set a focus event to the button that toggles the modal (the hope is for the button to receive focus)
However, I am experiencing 2 issues.
- focus doesn’t move to the button
- i am not able to select the id of the button (The button is in a dynamically generated table).
Idially I would like it to behave like the follwoing example https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_html_blur, I trying using the javascript, but have not been able to make it work.
any ideas?
Thanks