ImageButton behind ToolTip is firing when user hits Enter

4 posts, 0 answers
  1. Steven
    Steven avatar
    29 posts
    Member since:
    Jan 2013

    Posted 20 Apr 2013 Link to this post

    I have a RadToolTip that is being shown as a modal dialog.  The dialog contains a RadGrid with Filtering enabled. When the user enters filter text and hits ENTER to apply the filter, an image button on the main page behind the modal dialog fires.

    How do I stop this behavior?

    Thanks

    Steve
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 24 Apr 2013 Link to this post

    Hi Steve,

    Can you confirm you page does not have a DefaultButton set (for the form or for some Panel) and that there isn't a global handler for an event like keydown that waits for the enter key to programmatically click the button? At this point I cannot think of other reasons for this behavior.

    I have just tried that and it seems to work as expected with me. I am attaching here a simple example and a screen capture with the expected behavior.


    All the best,
    Marin Bratanov
    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
  4. Steven
    Steven avatar
    29 posts
    Member since:
    Jan 2013

    Posted 24 Apr 2013 Link to this post

    There is no default button set anywhere, however there is a script that checks the Enter key. The script is part of the code for the User Control that appears in the tooltip, and is as follows:

    function applyFilter(args) {
        if (args.keyCode == 13) {
            resetGridData();
        }
    }

    This script is attached to the filter textboxes of a RadGrid, and I use it to apply the filter when the user hits enter.  Could that somehow also be firing the ImageButton (which happens to be the first control on the page I believe) for the web form below?  Is there a better way to get a RadGrid to apply a filter when the enter key is hit. Most of the code for the RadGrid is client side, including loading through a web service.
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 26 Apr 2013 Link to this post

    Hello Steven,

    I do not know what this function does exactly, yet you can simply remove it to test if it is causing this behavior. If it is you would need to debug it and see what exactly in it is clicking the button.


    Kind regards,
    Marin Bratanov
    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.
Back to Top