key up event not work in Firefox when enter key press other browser enter key work

2 posts, 0 answers
  1. M Kumar
    M Kumar avatar
    96 posts
    Member since:
    Apr 2008

    Posted 17 Jan 2019 Link to this post



              I put radtextbox on that we put the onkeyup event it work in chrome,ie but not work in Firefox when enter key press but other than enter key it work in firefox.



     <telerik:RadTextBox ID="mainSearchTxt" onkeyup="mainSearchTxt_keyup(event,id)" EmptyMessage="Content Search"  Width="150px" runat="server"> </telerik:RadTextBox>

    function mainSearchTxt_keyup(e, id) {

        var unicode = e.charCode ? e.charCode : e.which;


    This alert message show in firefox when all keypress except "Enter key" for that i need solution




  2. Vessy
    Vessy avatar
    2091 posts

    Posted 22 Jan 2019 Link to this post

    Hi M Kumar,

    By default RadTextBox submits its content when the Enter key is pressed this is why the standard Enter key-up event is not triggered as expected. You can handle the control's client-side KeyPress event, though, and cancel its arguments in case you want to prevent the page submission:

    For example:
    <telerik:RadTextBox ID="mainSearchTxt" EmptyMessage="Content Search" Width="150px" runat="server">
        <ClientEvents OnKeyPress="onKeyPress" />
        function onKeyPress(textBox, args) {
            var unicode = args.get_keyCode();
            if (unicode == 13) {

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top