My current app has a legacy modal that uses a kendo dropdown list element bound to an ajax call with filtering. I'm trying to avoid rewriting this component if possible. However, there is an issue where when the modal opens and you focus on the dropdown list, the modal assumes you are clicking outside of it, causing it to close immediately after opening. In Bootstrap 4, I was able to fix this using the following code:
$("#theModalId").on('shown.bs.modal',function () {
$(document).off('focusin');
})
Unfortunately, this solution no longer works in bootstrap 5. It seems like the focusin event may not be directly on the document element anymore. I can see that bootstrap is adding a focusin event, but I am unsure which element it is being added to since my previous code is now ineffective. I also attempted removing it from theModal element without success.
If anyone has any insights or solutions to this problem, I would greatly appreciate the help!