I have a bootstrap modal that calls the another bootstrap modal. Now the issue is that when I open the second bootstrap modal and close it the first bootstrap modal does not scroll any more. Instead the scroll is obtained by the background main page. What should I need to do here so that when i close the second modal then the first modal gets focused and obtain the scroll as it was before the second modal.
$('#modalTrigger').on('click', function () {
setTimeout(function () {
$('#modalBody').html($('#contentText').html());
}, 1000);
});
$('#btnPrimaryModalAction').on('click', function () {
$('#secondaryModal').modal('show');
});
Here is the link to JSFIDDLE that contains the two bootstrap modal which defines the situation mentioned above.