Scrolling then Autosizing Incorrectly Displays Window

3 posts, 1 answers
  1. Pat
    Pat avatar
    31 posts
    Member since:
    Dec 2011

    Posted 11 Jan 2013 Link to this post

    I'm using the RadWindow with multiple divs as it's content, while using a LinkButton control and javascript to toggle back and forth between each div.  I want the RadWindow to remain centered throughout the scroll and to autosize properly during the toggle.  The issue i'm having is  when scrolling and clicking the toggle button for the autosize functionality, the RadWindow shoots off the screen.  We have a temporary fix that removes the { position: relative !important; } attribute of the radwindow which resolves the "shooting off the screen" issue, but the RadWindow no longer stays in place when the user scrolls the screen.

    The link below is a dropbox link to very simple .aspx examples.  The first being displaying the issue and the second displaying the temporary fix.

    Is there any way to achieve my desired functionality?  Thanks for the feedback!

    - Pat


    Attached Pages (Dropbox link)
  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3596 posts

    Posted 15 Jan 2013 Link to this post

    Hi Pat,

    By default, RadWindow is centered after autosizing, but you have modified its AutoSizeBehaviors so that its top left corner stays in place. Removing that will have it center itself after autosizing. Thus, calling center() immediately after autosizing is not needed.

    On scrolling - the Pin behavior of the RadWindow should be used for keeping it in he same position relative to the viewport instead of overriding its position to fixed. The following function can make sure that it is always shown pinned:
    function OnClientShow(sender, args)
    {
        if (!sender.isPinned())
        {
            sender.togglePin();
        }
    }
    which is, of course, attached to the OnClientShow event of the control.

    I am attaching here your page with my modifications and comments next to them as a reference. A flash video with the expected behavior shown in my end is also present in the archive.

    I also advise that you examine the following help article on configuring autosizing: http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-autosize-not-correct.html.

    Kind regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pat
    Pat avatar
    31 posts
    Member since:
    Dec 2011

    Posted 15 Jan 2013 Link to this post

    Perfect Marin, appreciate the feedback.

    Fixed the issue!

    - Pat
Back to Top