I'm using vue.js 2 and bootsrap 3 to open a modal that opens a 2nd modal.
Few days ago, I asked a question on how to set a focus on a control contained in a 2nd modal. I got a great answer that solved the issue.
Problem When opening the 1st modal, the user is able to scroll through it to see its bottom. But after opening and closing the 2nd modal, the focus moves to the page that contains the 1st modal. and when the user scrolls to see the rest of the 1st modal, he scrolls the page behind that 1st modal.
It is very uncomfortable to use especially when the modal is bigger than the screen height. Is there a way to prevent this?
To reproduce this issue, open the answer and click on "Expand snippet"
That work for me:
$('#my-modal').on('hidden.bs.modal', function () {
$('body').addClass('modal-open');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With