This is a migrated thread and some comments may be shown as answers.

In Q3 2013 the clicking of default RadButton is not raised when Enter key is pressed inside a password TextBox

0 Answers 49 Views
Button
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Telerik Admin
Top achievements
Rank 1
Iron
Telerik Admin asked on 18 Oct 2013, 02:22 PM
This issue is fixed in Q1 2013 SP1.

In Q3 2013 the clicking of RadButton is not raised when Enter key is pressed inside a password TextBox and the RadButton is set to be the default button for the form (Link to feedback portal).

The issue will be fixed for the upcoming Q3 2013 SP1. For the time being the following workaround can be used:

This is a common setup that will cause the problem described above:
<form id="form1" runat="server" defaultbutton="RadButton1">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <asp:TextBox runat="server" ID="TextBox1" TextMode="Password" />
    <telerik:RadButton runat="server" ID="RadButton1" Text="Submit" />
</form>
This function override should be placed at the end of the page to fix the issues:
<script type="text/javascript">
    Telerik.Web.UI.RadButton.prototype._isInputTypeText = function (element) {
        var nodeName = element.nodeName,
        type = element.type;
        if (nodeName != "INPUT" || !type) return false;
        return type == "text" || type == "password" || type == "email" || type == "number" || type == "url" || type == "search" || type == "tel";
    }
</script>
Tags
Button
Asked by
Telerik Admin
Top achievements
Rank 1
Iron
Share this question
or