Button with ContentTemplate RadConfirm callback in Firefox

3 posts, 0 answers
  1. Joe
    Joe avatar
    2 posts
    Member since:
    Jul 2014

    Posted 19 Apr 2017 Link to this post

    I work on a large website that has many RadButtons with ContentTemplates, and uses a RadConfirm and callback functionality to confirm the user action and perform a PostBack.  Recently, someone noticed that the JavaScript code inside the callback sender.click() does not work in Firefox.

    This is a known bug, as documented here LINK

    Great, so I've set about adding the Firefox-specific workaround, as seen in this demo.  LINK

    if (shouldSubmit) {
              //initiate the original postback again
              sender.click();
                if (Telerik.Web.Browser.ff) {
                    sender.get_element().click();
              }
    }

     

    Which works fine with normal RadButtons.  But, I've found if the RadButton has a <ContentTemplate> declared, the postback is not executed, and the confirm keeps calling the OnClientClicking method which opens the RadConfirm again.

    I've copied the code from this Demo into my own test page and reproduced the issue, it is very simple to reproduce.  Simply add a ContentTemplate to the second button.

    <telerik:RadButton RenderMode="Lightweight" ID="btnRadConfirm" runat="server" Text="RadConfirm" OnClientClicking="RadConfirm" OnClick="Button_Click">
      <ContentTemplate>
         Template
       </ContentTemplate>         
    </telerik:RadButton>

     

    And now the confirmation cannot cause a postback in Firefox.  We are using Telerik version 2016.2.607.45

  2. Joe
    Joe avatar
    2 posts
    Member since:
    Jul 2014

    Posted 25 Apr 2017 Link to this post

    6 days and no answer, looks like I'll go through the official support channels then.
  3. Sean
    Sean avatar
    1 posts
    Member since:
    May 2016

    Posted 01 May 2017 Link to this post

    Telerik's official answer for this is to use the RadPushButton instead of the RadButton for RadConfirm functionality.  This makes the confirm callback work in Firefox.  The RadPushButton does not support some RadButton functionality like ToggleStates, so be warned.
Back to Top