Hello,

I am reposting this issue from here: https://intersoftsolutions.com/Community/WebGrid/Webgrid-keeping-focus-while-a-modal-is-active/

I have been trying to implement a modal dialog into my code, but have found that if I open the dialog from the WebGrid's context menu the user can still navigate the grid with the arrow keys and even type in the filter fields. I was able to reproduce this issue with the OnBeforeDelete method, as you can see in my example below.

This issue does not happen on grid methods which do not use the context menu such as OnCellDoubleClick. This has lead me to believe the grid has code to retake focus once the context menu has closed and it is causing problems with the modal's functionality.

My example code contains Bootstrap, SweetAlert2 and SkinnyJs modals. My example code can be found here: https://www.dropbox.com/s/jlw9okw2ok946dy/GridTestIntersoft.zip?dl=0

Please let me know how to proceed.

Thanks,

James