+1-888-365-2779
Try Now
More in this section

Forums / Suggestions / Right Arrow key and Single quote key keyCode value is same in firefox browser.

Right Arrow key and Single quote key keyCode value is same in firefox browser.

2 posts, 0 answered
  1. Heera
    Heera avatar
    4 posts
    Registered:
    05 Dec 2011
    17 May 2013
    Link to this post
    When i type in radtextbox(AspAjax). and i goto to back and forward in
    radtextbox then back is ok but forward(right arrow key) is not work
    because singlequote and rightarrow key value are same. and i have handle
    single quote key.



    i have used javascript function that is for do not allow single quote in textbox.



    please help



    Example :-



    I have type : -   Hello

    I have back  to E character  He-llo

    then i go to forward right arrow  key then i am not go to right side.



    my javascript function is :

    <telerik:RadTextBox ID="txtName" runat="server" Width="180" MaxLength="25" OnKeyPress = "TextBox_NotAllowedSingleQuotes">

                                            </telerik:RadTextBox>





    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

            <script type="text/javascript">

    function TextBox_NotAllowedSingleQuotes(sender, eventArgs) {

        if (eventArgs.get_keyCharacter() == '\'') {

            eventArgs.set_cancel(true);

            return true;

        }

    return false;

    }

    </script>

    </telerik:RadCodeBlock>



    please help me.
  2. Angel Petrov
    Angel Petrov avatar
    1 posts
    Registered:
    30 Sep 2016
    22 May 2013
    Link to this post
    Hi Heera,

    Generally the OnKeyPress event should not fire for the arrow buttons. Using the code you provided I have created a sample web site and tested it under various browsers. I was not able to reproduce the problem described. Please test the attached sample and let us know of the result.

    Regards,
    Angel Petrov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
2 posts, 0 answered