Bug Report: Animations Prevent AutoSize from Working

8 posts, 0 answers
  1. Jeff
    Jeff avatar
    51 posts
    Member since:
    Aug 2007

    Posted 02 Nov 2009 Link to this post

    Hello,

    I'm running 2009.2.826.35 and if I have AutoSize set to true. If I set the Animation property to anything but "None," the window doesn't autosize. It opens at ~ 300px by 300px.

    This behavior is consistent on Firefox and IE.

    Has anyone else seen this? Is there a workaround?

    Autosize works fine with Animations set to None but it sure is boring! :)

    Jeff
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 03 Nov 2009 Link to this post

    Hello Jeff,

    The autosize demo of the control actually uses animation (Fade). Could you please tell me what is your exact scenario?


    Kind regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jeff
    Jeff avatar
    51 posts
    Member since:
    Aug 2007

    Posted 03 Nov 2009 Link to this post

    Hi Georgi,

    I think the difference is the AutoSize demo presets the height and width. I leave those values at their default so that the AutoSize property sets the window to the correct size (that's what it's for, right).

    Here's how my RadWindow looks in the aspx file:
        <telerik:RadWindow ID="wndPageProperties" runat="server" Skin="Office2007"  
            AutoSize="True" Modal="True" 
            NavigateUrl="/Take7/Sitefinity/Admin/DeviseAdmin/Pages/PageProperties.aspx"  
            Overlay="True" Title="Page Properties" Animation="Resize"
        </telerik:RadWindow> 
     

    It's also worth noting that clicking the refresh button on the caption bar forces the window to auto size.

    Jeff
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 05 Nov 2009 Link to this post

    Hi Jeff,

    Thank you for the code - now I was able to reproduce the problem. I logged it in our database and we will do our best to have it fixed for the next service pack. Your points were updated.


    Regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Gene
    Gene avatar
    64 posts
    Member since:
    Dec 2007

    Posted 18 Nov 2009 Link to this post

    Is there any scenario where the AutoSize works?
  7. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 19 Nov 2009 Link to this post

    Hi Gene,

    With the current version of the control, AutoSize works as expected as long as there is no animation. The problem discussed in this thread is already fixed in our internal builds and scenarios where autosize and animations are enabled will be supported once the service pack is released.


    Best wishes,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. Gene
    Gene avatar
    64 posts
    Member since:
    Dec 2007

    Posted 30 Dec 2009 Link to this post

    I have yet to get this to work and I am on 2009.3.1103.20.  It doesn't matter if I have animation set to none or not.

    My markup looks pretty straightforward:

        <telerik:RadWindow ID="RadWindow1" runat="server" Modal="True" OnClientClose="OnClientClose" 
            Overlay="true" Animation="Resize" OpenerElementID="<%# btnSampleSelector.ClientID %>" 
            NavigateUrl="sample_selector.aspx" Behavior="Default" 
            Behaviors="Resize, Close, Maximize, Move" AutoSize="True">  
        </telerik:RadWindow> 

    Any ideas?
  9. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 31 Dec 2009 Link to this post

    Hello Gene,

    Thank you for the provided code, I built up a test demo based on it and I was able to reproduce the problem with the version you have mentioned.

    The problem comes from the fact that the animation script and the autosize script are trying to execute together and thus you do not get the desired result. In fact if I remove the animation the autosize starts working as expected.

    I am glad to inform you that the problem is fixed in the 2009 Q3 release, namely 2009.3.1208 - I tested your code with both the animation and autosize and it worked fine with the latest build.

    In order to fix the problem with your current build you should remove the AutoSize="true" and to call it manually in the OnClientShow event with timeout equal to the animation to ensure that it will start executing after the animation has ended. I prepared for you the following code snippet:

    <script type="text/javascript">
      
    function OnClientShow(sender, args)
    {
       setTimeout(function(){sender.autoSize(true);}, 500);
    }
      
    </script>
    <asp:Button ID="btnSampleSelector" runat="server" Text="Open RadWindow" />
    <telerik:RadWindow ID="RadWindow1" runat="server" Modal="True" Overlay="true" Animation="Resize"
        OnClientShow="OnClientShow" OpenerElementID="<%# btnSampleSelector.ClientID %>"
        NavigateUrl="Dialog.aspx" Behavior="Default" Behaviors="Resize, Close, Maximize, Move">
    </telerik:RadWindow>

    It autosizes the RadWindow with animation for the autosize as well - I assumed that you would like this effect since you are using animation for showing it. If you want to autosize the RadWindow without animation for the autosize itself, you should call the method autoSize without argument or with argument false.

    I hope that my reply is helpful, let me know how it goes.

    Sincerely yours,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017