Backspace navigates to previous

4 posts, 0 answers
  1. Antony
    Antony avatar
    57 posts
    Member since:
    Oct 2008

    Posted 12 Jun 2009 Link to this post

    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
  2. Mark Griebling
    Mark  Griebling avatar
    129 posts
    Member since:
    Dec 2005

    Posted 12 Jun 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Antony
    Antony avatar
    57 posts
    Member since:
    Oct 2008

    Posted 15 Jun 2009 Link to this post

    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
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 15 Jun 2009 Link to this post

    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.
Back to Top