OnClick not firing in Firefox... under specific conditions

4 posts, 0 answers
  1. Dan
    Dan avatar
    124 posts
    Member since:
    Feb 2011

    Posted 26 Jul 2013 Link to this post

    I have a page that runs in a RadWindow.  There is a RadButton on this page, that has both an OnClientClicking event (which sets a Tab control index) and an OnClick event which fires logic on the server through the RadAjaxManager.

    In Chrome and IE, the OnClientClicking fires, then the OnClick makes the postback.

    On Firefox however, the OnClientClicking is the end of the line.  OnClick does not get fired.

    If I run this same page directly, instead of from the RadWindow - it works as expected in FireFox...

    This is my OnClientClicking routine - pretty simple - I can't see why Firefox would stop.  I get no errors in the Console, etc...

    function setResultsTab(sender, args)
    {
        var tabStrip = $find('<%=tabCriteria.ClientID%>');
        var tab = tabStrip.findTabByValue('1');
        tab.select();
    }
    <telerik:RadButton ID="bAdvancedSearch" runat="server" Text="Search" SkinID="defaultButtonLargeSearch"
        OnClick="click_AdvancedSearch" meta:resourcekey="bAdvancedSearchResource2" OnClientClicking="setResultsTab"/>
  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1492 posts

    Posted 31 Jul 2013 Link to this post

    Hello Dan,

    I have tried to reproduce the unexpected behavior but to no avail. Could you please watch a short video test in the attached archive and then tell me what I am missing?

    Could you also confirm whether you are using the latest official version of RadControl - 2013.2.717, and if not does upgrading to it resolve the issue? I am asking about that because in previous version of RadControls there was a similar issue of RadButton's OnClick event triggering in specific browsers.

    If the above information, however, is not helpful, could you please try to reproduce the unexpected behavior with the attached VS example and then tell us what changes you have made, so that we can make an investigation locally?


    Regards,
    Danail Vasilev
    Telerik
    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 the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Randy
    Randy avatar
    50 posts
    Member since:
    Aug 2010

    Posted 13 Aug 2013 Link to this post

    Dan asked me to follow up with this.

    The problem only happens in Firefox and ONLY when you are in a RadWindow - not the main page.  The example provided doesn't appear to use RadWindow, so I expect it to function just fine.  The server event OnClick will not fire if either of the client side events - OnClientClicked or OnClientClicking are present.  I did find a work around.  If you set the button to UseSubmitBehavior="false", it functions in all of the browsers as expected.

    Any idea why this is the case?  And is there any reason that we shouldn't always set the submit behavior to false?

    -Randy
  5. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1492 posts

    Posted 16 Aug 2013 Link to this post

    Hello Randy,

    I have tried loading a page with a RadButton inside RadWindow through the NavigateUrl property of the RadWindow and it seems that events of the RadButtons are working properly on my side. You can watch the short video with the test in the attached archive and then tell me what I am missing.

    Could you also tell us whether your version of RadControls is the latest one - 2013.2.717 and if not does upgrading to it resolve the issue?

    Regarding the UseSubmitBehavior property of the RadButton it indicates whether the button will use the browser's submit mechanism or the ASP.NET postback mechanism. More information on the matter can be found in this help article.


    Regards,
    Danail Vasilev
    Telerik
    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 the blog feed now.
Back to Top