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

Move focus from Radmenu

3 Answers 137 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Sean Severson
Top achievements
Rank 1
Sean Severson asked on 18 Nov 2011, 02:44 PM
My page contains a RadMenu with ClickToOpen = true.  After that, hovering over the menu will expand to display the child menu items.  Upon selection of one of the child menu items I open a modal RadWindow via javascript.  I also use javascript to collapse the radmenu (shown below).

The problem is that after the RadWindow is closed (no pastback occurs on the parent page), it is no longer necessary to click on the RadMenu to begin showing the menu items.  All the user needs to do is hover.  I have attempted to move the focus to another control on the page, but the RadMenu does not appear to lose focus.  I also tried using the blur() method in the code that collapses the menu, but that does not appear to work either.  How do I move the focus away from the menu so users must click on the menu to again open it?

Here is the javascript function to collapse (with the call to Blur to try to move the focus away from the RadMenu). 

function CollapseMenu() { 
    //close the menu 
    var menu = $find("<%= mnuActions.ClientID %>"); 
    var topMenuItem = menu.get_items().getItem(0); 
    topMenuItem.close(); 
    topMenuItem.Blur(); 
}


Thanks!

Sean M. Severson

3 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 21 Nov 2011, 05:49 PM
Hi Sean,

You could try to use the approach recommended in this forum post. Let me know how it goes and if it helps you get the desired behavior. 

Greetings,
Kate
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
Sean Severson
Top achievements
Rank 1
answered on 22 Nov 2011, 04:36 PM
Kate,

Unless I am missing something, the thread you suggested only addresses the closing of the RadMenu.  I am able to close the Radmenu just fine.  The problem I am experiencing is that once a menu item is selected, I need to somehow "reset" the RadMenu so that the user must click on the top level menu item in order to expand.  i would think that moving the focus from the Radmenu to another control would solve the problem, but I have not been able to make this happen.

Sean M. Severson
0
Kate
Telerik team
answered on 25 Nov 2011, 10:40 AM
Hi Sean,

I understand that you need to reset the RadMenu but it seems that you have already tried the different approaches that I would have suggested. However, I could think of one more approach that seems to be suitable for your scenario. Here you can find a help article where the desired behavior is demonstrated.  

All the best,
Kate
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
Menu
Asked by
Sean Severson
Top achievements
Rank 1
Answers by
Kate
Telerik team
Sean Severson
Top achievements
Rank 1
Share this question
or