This is a migrated thread and some comments may be shown as answers.

RadWindow moves to the top upon close

3 Answers 62 Views
Window
This is a migrated thread and some comments may be shown as answers.
Raheel Ashraf
Top achievements
Rank 1
Raheel Ashraf asked on 15 Jul 2010, 02:54 PM
I open a modal rad window as popup and while opening through javascript, i use to MoveTo api to move to it to the centre of the screen. On the window, I have a button called close, which on click, executes close() on the window, but to my surprise, when the window is closed, the other window that opened it, scrolls to the top..
when i looked in detail, the radwindow had some default close event handler, which uses some "_focusedPageElement" and focuses on it,, in my case _focusedPageElement was referring to the iframe of the window that opened the popup..
why is that?? how can i prevent that?

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 15 Jul 2010, 03:17 PM
Hi Raheel Ashraf,

Indeed, the reason for this behavior is the moving of the focus and this is not directly related to RadControls but can be also reproduced with standard HTMl elements. You can find a detailed workaround on how to resolve this problem (which occurs only under IE and is related to browser specific behavior):

http://www.telerik.com/support/kb/aspnet-ajax/window/persist-radwindow-s-scroll-position.aspx

All the best,
Svetlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Raheel Ashraf
Top achievements
Rank 1
answered on 15 Jul 2010, 03:37 PM
thanks for the link..however, what value to set for the timeout..in the example it is 30ms, but if i remember, the default close handler for radwindow, also does a timeout and in that, it sets the focus..so is 30 a safe number then?
0
Svetlina Anati
Telerik team
answered on 20 Jul 2010, 11:21 AM
Hi Raheel Ashraf,

You are correct that when a radWindow is modal, it resets the focus by using a small timeout of 10ms /this is not the case with non modal RadWindow, it does not change focus at all and no timeout is used there so it is not correct to say that the default  close handler uses a timeout /. Since there is only the 10ms timeout, using 30ms should be safe enough and we have also not been contacted with reports for problems with that.

Greetings,
Svetlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
Raheel Ashraf
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Raheel Ashraf
Top achievements
Rank 1
Share this question
or