My home page has a lot of content. When I create any modal dialog, the body content scroll bar is visible and when we scroll, it scrolls down to the bottom of the page.
When I used $('body').css('overflow','scroll')
or $('body').css('overflow', 'inherit')
the scroll bar appeared not at the right corner of the browser window, but on the edge of the page container...
I know that this issue because of layout and css styles of the particular site, but in this case changing the style of html tag seems to be more universal:
$('html').css('overflow','hidden');
- hide scroll bar$('html').css('overflow','scroll');
- show scroll bar