I found a bug with RadWindow and FireFox

3 posts, 0 answers
  1. The ReBigulator
    The ReBigulator avatar
    2 posts
    Member since:
    Jul 2009

    Posted 01 Jul 2009 Link to this post


    I found this bug when using the rad window in firefox (FF v3.0.11). I have a demo project but I don't see how to attach it to this posting.

    To re-create the bug

    1. Create a page with a button to be used as the openerelementId. Make sure the button is below the fold of the page meaning the user has to scroll down a page length to get to the button. Add this



    telerik:RadWindow ID="rw" runat="server" Width="610" Height="400" Skin="WebBlue"



    OpenerElementID="<%# btnPop.ClientID %>" VisibleStatusbar="false" NavigateUrl="thePopup.aspx"



    VisibleTitlebar="false" Modal="True" ReloadOnShow="true" ShowContentDuringLoad="true"/>


    2. Create a popup page (thePopup.aspx) with a button and assign that button to the forms defaultbutton as in 




    3. Laungh the default page in firefox, click the button and you'll see your pop up , pop open and within a few second the popup shold jump to the bottom of launching screen.

    Fun huh?

    That drove me crazy for a few days and I think by exposing it, I should be rewarded with a free copy of the Telerik UI Libray :)

    I found a workaround but its an odd problem and I'd like an explanation if possible.

    Thank you.


  2. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 02 Jul 2009 Link to this post


    Actually this is not a bug but a default browser's behavior when you display in an IFRAME a page that has a default button set. For your convenience I attached to this thread a small sample based on your setup along with the same scenario that uses an IFRAME instead of RadWindow. As you can see for yourself, the behavior is the same in both cases.
    The good news is that in the attached sample, there is a solution as well :) What I suggest is to use the ASP.NET AJAX's native pageLoad function (same as window.onload in ASP.NET) that automatically runs when all controls on the page has been loaded. There you could use the client-side focus() method to set the focus on the desired button. This will produce the same result as the defaultbutton setting, but will not have the side effect in Firefox.

    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.
  3. The ReBigulator
    The ReBigulator avatar
    2 posts
    Member since:
    Jul 2009

    Posted 02 Jul 2009 Link to this post

    Hi Georgi

    Thanks for the information. By using the defaultbutton setting i was trying to set the button to be clicked when the user hit the enter key after filling a series of text boxes not to set the focus to the button when page loaded.

    My solution was to wrap the contents a panel and use an imagebutton. The panel has a defaultbutton property but can only be set to an imagebutton or a button that inherits from ibuttoncontrol.

    Thank you.
Back to Top