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

Backspace navigates to previous

3 Answers 92 Views
Window
This is a migrated thread and some comments may be shown as answers.
Antony
Top achievements
Rank 1
Antony asked on 12 Jun 2009, 03:15 PM
Hi Everyone,

I am reusing a Radwindow in various places as a modal popup, the problem is if someone presses the backspace key when there is no control with focus the popup loads the contents of the last time the popup was used.
Is there anyway to stop this from happenning?
I assume it has to do with Browser history, is there a way to tell the window not to add the URL into the history each time the window is displayed?

Any ideas welcomed

Antony

3 Answers, 1 is accepted

Sort by
0
Mark Griebling
Top achievements
Rank 1
answered on 12 Jun 2009, 06:43 PM
We just noticed this also.  To resolve it we set DestroyOnClose="True".  However, since the Window is destroyed any specified size is also lost and the next time you open the window it will use a default size.  You may be able to use AutoSize="True".  This can still be a problem depending on your css positioning for the page opened in the RadWindow.  In our case we had to set the size in the javascript when opening the RadWindow.  At this point we eliminated our predefined RadWindows.
0
Antony
Top achievements
Rank 1
answered on 15 Jun 2009, 07:11 AM
Hi Mark,

Yes in most cases I can destroy the window on close, but in 2 specific instances the window loads alot of data and it is likely that the user will re open the window several times. Destroying the window in this case would mean reloading all the data each time which seems like a waste.

Please has anyone come up with a solution, the re using of a RadWindow is supposed to be a feature surely Telerik realised that this would be an issue and have a solution.

Thanks
Antony
0
Georgi Tunev
Telerik team
answered on 15 Jun 2009, 01:06 PM
Hi guys,

The only way to avoid that is to use DestroyOnClose and destroy the window object. The problem here is not with the RadWindow control itself - it is basically an IFRAME and this is the way how browsers work with IFRAMEs. If you load a page in an IFRAME, navigate away from that (content) page, this will result in adding this action into browser's history. For security reasons however, the history object is read only and you cannot clear it.

As noted in the article above, you could use location.replace() to change the url of the content page without adding an item to the history, but this depends on the developer to change its logic - we cannot control that behavior in any way.



Sincerely yours,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
Antony
Top achievements
Rank 1
Answers by
Mark Griebling
Top achievements
Rank 1
Antony
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or