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