Interesting find. It appears to be some sort of bug or behavior introduced by bootstrap; Very odd behavior for tab index -1.
Here is one work around using jQuery, which involves setting a first
and last
id on the first and last tab-able elements on the modal.
$('#myModal').keydown(function(e){
if($('#last').is(":focus") && (e.which || e.keyCode) == 9){
e.preventDefault();
$('#first').focus();
}
});
Example