We are using RadControls for ASP.NET AJAX version 2010.1.519.40
When a RadComboBox is inside of a panel with the DefaultButton set and the <enter> key is pressed the default button does not fire in IE or Chrome. It works in Firefox.
Here is a sample page with two RadComboBox controls and three buttons inside of a panel that I created to demonstrate this issue:
When a RadComboBox is inside of a panel with the DefaultButton set and the <enter> key is pressed the default button does not fire in IE or Chrome. It works in Firefox.
Here is a sample page with two RadComboBox controls and three buttons inside of a panel that I created to demonstrate this issue:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadComboBox.aspx.cs" Inherits="RadControlsWebApp1.RadComboBox" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <script language="javascript" type="text/javascript"> function logEvent(eventToLog) { if (eventToLog == null) { $(".infoArea").html(''); } else { var txt = $(".infoArea").html(); txt = eventToLog + '<br>' + txt; $(".infoArea").html(txt); } } function rcbComboBox_ClientKeyPressing(sender, eventArgs) { var keyCode = eventArgs.get_domEvent().keyCode; logEvent('----------------------------------------------------'); logEvent('rcbComboBox_ClientKeyPressing (' + sender._uniqueId + ' --> ' + keyCode + ')'); if (keyCode == 13 && !sender.get_dropDownVisible()) { logEvent('<enter> key pressed while dropdown.visible = false'); } } </script></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <%--Needed for JavaScript IntelliSense in VS2010--%> <%--For VS2008 replace RadScriptManager with ScriptManager--%> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> </Scripts> </telerik:RadScriptManager> <div> <asp:Panel ID="pnlDefault" runat="server" DefaultButton="btnSubmit"> <telerik:RadComboBox ID="rcbOne" runat="server" OnClientKeyPressing="rcbComboBox_ClientKeyPressing"> <Items> <telerik:RadComboBoxItem Text="Item 0" /> <telerik:RadComboBoxItem Text="Item 1" /> <telerik:RadComboBoxItem Text="Item 2" /> <telerik:RadComboBoxItem Text="Item 3" /> </Items> </telerik:RadComboBox> <telerik:RadComboBox ID="rcbTwo" runat="server" OnClientKeyPressing="rcbComboBox_ClientKeyPressing"> <Items> <telerik:RadComboBoxItem Text="Item 0" /> <telerik:RadComboBoxItem Text="Item 1" /> <telerik:RadComboBoxItem Text="Item 2" /> <telerik:RadComboBoxItem Text="Item 3" /> </Items> </telerik:RadComboBox> <asp:Button ID="btnOne" runat="server" Text="Button One" OnClientClick="logEvent('btnOne_Click'); return(false);" /> <asp:Button ID="btnTwo" runat="server" Text="Button Two" OnClientClick="logEvent('btnTwo_Click'); return(false);" /> <asp:Button ID="btnSubmit" runat="server" Text="Default Button" OnClientClick="logEvent('btnSubmit_Click!!!!'); return(false);" /><br /> <br /> <div class="infoArea"> </div> </asp:Panel> </div> </form></body></html>