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

Disable backspace for page navigation

7 Answers 169 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
ranro
Top achievements
Rank 1
ranro asked on 24 Jul 2008, 10:59 PM
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.

7 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 25 Jul 2008, 07:43 AM
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.
0
Robert
Top achievements
Rank 1
answered on 01 Mar 2013, 02:44 PM
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;
          }
        }
0
Nencho
Telerik team
answered on 06 Mar 2013, 11:12 AM
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.
0
Robert
Top achievements
Rank 1
answered on 06 Mar 2013, 01:43 PM
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
0
Nencho
Telerik team
answered on 11 Mar 2013, 09:18 AM
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.
0
Keith
Top achievements
Rank 1
answered on 13 Feb 2014, 03:59 PM
Has there been a correction for this since your post on Mach 11, 2013?
0
Nencho
Telerik team
answered on 18 Feb 2014, 11:15 AM
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.
Tags
ComboBox
Asked by
ranro
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Robert
Top achievements
Rank 1
Nencho
Telerik team
Keith
Top achievements
Rank 1
Share this question
or