Hi Michael,
Thank you for bringing this issue to our attention. We investigated it and here are our findings:
- The problem does not exist if UpdatePanel is not used.
- The setup works under IE in all cases.
- Ultimately the reason for the problem is in the Firefox implementation. It can be reproduced if no RadControls are used as well.
Here is a sample setup that reproduces the problem without RadFormDecorator -
it actually represents how the RadFormDecorator works. When you click a "decorated" button, RadFormDecorator finds the corresponding real button and call its click() method:
<asp:ScriptManager ID="ScriptManager1" runat="server"> |
</asp:ScriptManager> |
<asp:UpdatePanel ID="panel1" runat="server"> |
<ContentTemplate> |
<script type="text/javascript"> |
function submitForm() |
{ |
var input = $get("<%=Button1.ClientID %>"); |
input.click(); |
} |
</script> |
<button onclick="submitForm();return false;"> |
Click to submit</button> |
<asp:Button ID="Button1" runat="server" Text="test" OnClick="Button1_Click" /><asp:Label |
ID="lbl1" runat="server"></asp:Label> |
</ContentTemplate> |
</asp:UpdatePanel> |
The good news is that there is an easy solution for this case - you only need to set the button's
UseSubmitBehavior property to
false (it is true by default). Then the button will be rendered as <input type="button" .. element and everything will work as expected.
Sincerely yours,
Georgi Tunev
the Telerik team