Disable backspace for page navigation

8 posts, 0 answers
  1. ranro
    ranro avatar
    50 posts
    Member since:
    Aug 2007

    Posted 24 Jul 2008 Link to this post

    When I am using the rad combobox and select an item and then hit backspace, the browser always navigates to the last page I was at.  How do I disable the backspace for navigation but leave it working for editing text.
  2. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 25 Jul 2008 Link to this post

    Hi ,

    To achieve the needed approach you can follow the steps:

    1.Hook on the OnClientKeyPressing event of RadComboBox.
    2.Hook on keydown event of the body by the following way <body class="BODY" onkeydown="return checkShortcut()">.
    3.Use the following javascript:

     
    <script type="text/javascript">  
     
      var ev = null;  
        
      function OnClientKeypressing(sender, eventArgs)  
      {  
           if (eventArgs.get_domEvent().keyCode == 8)  
          {  
             ev = eventArgs.get_domEvent();  
          }  
     
      }  
        
    function checkShortcut()  
    {  
             if(ev!=null && (ev.keyCode==8 || ev.keyCode==13))  
             {  
                   return false;  
             }  
    }  
     
    </script> 


    Regards,
    Rosi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Robert
    Robert avatar
    198 posts
    Member since:
    Aug 2009

    Posted 01 Mar 2013 Link to this post

    Seems 4 (almost 5) years later they still haven't fixed this problem???

    Don't forget to set ev=null or you won't be able to tab out of the combobox!

            function checkShortcut() {
              if (ev != null && (ev.keyCode == 8 || ev.keyCode == 13)) {
                ev = null;
                return false;
              }
            }
  5. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 06 Mar 2013 Link to this post

    Hello Robert,

    Since I am not able to replicate the described problematic behavior with our latest official release, would you specify which version of our controls are you using at your end? In addition, under which browser do you observe this problem?

    All the best,
    Nencho
    the Telerik team
    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.
  6. Robert
    Robert avatar
    198 posts
    Member since:
    Aug 2009

    Posted 06 Mar 2013 Link to this post

    Nencho,

    It happens in all browsers but I am using IE 9 specifically and you can use one of your online demos to reproduce the behavior which I assume is the latest release.

    Steps to reproduce:

    1,) go to the online demo at: http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/xmlstringbinding/defaultcs.aspx.  This takes you to the XML String Binding demo.
    2.) click on the Declarative Databases demo link on the left.
    3.) Select on option from one of the combo boxes and hit the backspace key and it will return you to the XML Binding Demo page. 

    As long as there is a previous page in the browser history hitting the backspace will cause this behavior.

    Thanks

    Robert
  7. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 11 Mar 2013 Link to this post

    Hello Robert,

    Your observations are absolutely correct. I have already logged this problematic behavior as a bug and we are currently working on fixing it. Thank you for your cooperation.

    Kind regards,
    Nencho
    the Telerik team
    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.
  8. Keith
    Keith avatar
    1 posts
    Member since:
    Apr 2011

    Posted 13 Feb 2014 in reply to Nencho Link to this post

    Has there been a correction for this since your post on Mach 11, 2013?
  9. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 18 Feb 2014 Link to this post

    Hello Keith,

    I am afraid that the issue is not fixed yet. We will do our best, in order to include the fix in our upcoming Service Pack. Meanwhile, you could track its process here.

    Regards,
    Nencho
    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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017