Hitting Backspace in Hex Input Box Triggers Browser Back

2 posts, 0 answers
  1. Dean
    Dean avatar
    17 posts
    Member since:
    Jan 2008

    Posted 18 Oct 2011 Link to this post

    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
  2. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 21 Oct 2011 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top