In my web project, I have set of blocks, representing projects thumbnails. When I click on thumbnail, the detail view appears. This view is div over full page and has position fixed, z-index bigger than anything else. I can scroll detail (which is of course what I want), but also it sometimes scrolls body. I have tested few solution, which I have found, but none of them helped me completely. if i set body to overflow hidden, it prevents scrolling, but on the other hand, view jumps to top. Another solution: setting body to fixed position and top property to opposite of window.offsetY and then when closing detail setting window.scrollTo(offsetY), this solution also didnt work (detail is on top and i cant scroll).
So question is, how can I prevent scrolling body in fixed overlay element?