I have been working on a modal dialog that would alter the scrolling of a browser window. Essentially I have a page with a lot of content causing vertical scroll. I have a modal dialog that should pop up that also contains enough content to create vertical scrolling. The goal here is to make the browser scroll on the background content until the model is shown, and then it would switch to scrolling on the modal content.
I hope this helps someone. I have tested it in Chrome and Internet Explorer 7+.
Make sure you specify a DOCTYPE if you would like this to work in any version of Internet Explorer as it doesn’t like position:fixed without a DOCTYPE.