I\'m using twitter bootstrap for a project I am working on.
I have a modal window that has a somewhat longer form in it and I didn\'t like that when the window got
In case of using .modal {overflow-y: auto;}, would create additional scroll bar on the right of the page, when body is already overflowed.
The work around for this is to remove overflow from the body tag temporarily and set modal overflow-y to auto.
$('.myModalSelector').on('show.bs.modal', function () {
// Store initial body overflow value
_initial_body_overflow = $('body').css('overflow');
// Let modal be scrollable
$(this).css('overflow-y', 'auto');
$('body').css('overflow', 'hidden');
}).on('hide.bs.modal', function () {
// Reverse previous initialization
$(this).css('overflow-y', 'hidden');
$('body').css('overflow', _initial_body_overflow);
});