Persist scroll position when modal RadWindow is closed
When a modal RadWindow is shown and dragged on the page so that its scroll position is changed the scrolling "jumps back" after the RadWindow is closed
The modal RadWindow is intended to disable all the other content on the main page and thus if there is a control with a focus on the main page, it should lose its focus when the RadWindow is opened (to prevent accessing the main page by using the keyboard). AccordinglyÂ the focus should be returned after the RadWindow is closed. The default behavior of the browser, however, is to scroll the page to the element when it is focused and this causes change of the scroll position.
Sample code which shows this approach is available below:
To observe the difference you should drag the RadWindow down until the button hides from the viewport and you will see that without the described solution the page will scroll back to the button position while when the script is used it will maintain its current scroll position.