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

Hitting Backspace in Hex Input Box Triggers Browser Back

1 Answer 54 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 18 Oct 2011, 09:43 PM
Does anyone know how to trap the keydown event on the text inputbox on the ColorPicker?  When you put the cursor in the field and hit the Backspace key to erase what is there, the browser back button is triggered taking the user off of the page entirely.  I want to prevent that from happening.

Thanks,
Dean

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 21 Oct 2011, 11:59 AM
Hello Dean,

I tried to reproduce the described behavior on the online demo ColorPicker / First Look, but to no avail. Please check this screen capture and verify if I am missing something in order to recreate your scenario.

Nevertheless, you can reference the color input textbox via the RadColorPicker's Client API and then you can disable the backspace button on the keydown event of this textbox. I have attached a sample page, implementing the suggested approach. You can refer to it for incorporating this feature into your actual project.

I hope that helps. Please let us know if you encounter additional difficulties.

Best wishes,
Slav
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
Tags
ColorPicker
Asked by
Dean
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or