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

ImageButton behind ToolTip is firing when user hits Enter

3 Answers 43 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 20 Apr 2013, 01:33 PM
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

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 24 Apr 2013, 10:01 AM
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.
0
Steven
Top achievements
Rank 1
answered on 25 Apr 2013, 01:53 AM
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.
0
Marin Bratanov
Telerik team
answered on 26 Apr 2013, 10:39 AM
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.
Tags
ToolTip
Asked by
Steven
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Steven
Top achievements
Rank 1
Share this question
or