Modal with tabindex=“-1” gets focus on tab
问题 I'm working with Twitter Bootstrap at the moment, and I'm encountering a strange problem in the tabindex of a modal: I'm trying to tab through the form elements inside the modal, but after the last button the focus disappeared before coming back to the close button. I added a line in console that logs which element is being focused, and it turned out to be the modal itself, even though it has tabindex="-1" . I'm unable to share my code, but a quick look at the Bootstrap docs told me that it