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

menu not closing properly

12 Answers 170 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Daniel Collier
Top achievements
Rank 1
Daniel Collier asked on 15 Mar 2010, 08:40 PM
I set up a sample menu in our site and I noticed the dropdown menus are not closing as well as they are on the demo site.  For example: 

I hover over a menu, its dropdown slides out, then I move the mouse straight down really fast until my mouse cursor is well below the dropdown.  The dropdown does not collapse back in like it should.  I then loop them the mouse cursor around above another menu and repeat the process until every menu dropdown is displayed.  If I go back over the top menu or leave by moving the mouse up, it closes normally and I can use this to close all the slid out menus.  

Is there some "trick" to making the menus work as cleanly as they do on the demo site here?
Please help.

details:
I'm using a simple sitemap following code from the documentation (chm file).  I'm using MVC1, vs 2008 and chrome 4.0.

I have this on the site.master
            <%  
      Html.Telerik().Menu() 
                    .Name("Home") 
                    .BindTo("Web")
                    .Render;  
            %> 
and this in my controller method
[PopulateSiteMap(SiteMapName = "Web", ViewDataKey = "Web")]public ActionResult Landing(){    if (!SiteMapManager.SiteMaps.ContainsKey("Web"))    {        SiteMapManager.SiteMaps.Register<XmlSiteMap>("Web", sitmap => sitmap.LoadFrom("~/Web.sitemap"));    }    return View();}

12 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 16 Mar 2010, 08:54 AM
Hi Daniel Collier,

There is no trick involved in the menu shown on the demo web site. In order to pinpoint the problem I suggest you open a support ticket and send us a sample project. We will look into it and suggest a solution.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Daniel Collier
Top achievements
Rank 1
answered on 17 Mar 2010, 05:45 PM
I have a project that can reproduce the issue.  Unfortunately I am using the open source version of the mvc controls, so I do not have ability to create a support ticket.  Basically, I took your sample application with version 2009.3.1304 and the dropdown menus slid away correctly.  The problem seems to be with version 2010.1.309.  If I move the mouse slowly down any dropdown menu, it persists, rather than sliding back in like it should.

Any help would be greatly appreciated!  Thanks!
0
Alex Gyoshev
Telerik team
answered on 18 Mar 2010, 04:59 PM
Hello Daniel,

Sadly, we do not reproduce the issue locally. Since you cannot upload a project, please paste the relevant code in this thread using the Format Code Block tool in the editor, in the top right corner.

Kind regards,
Alex Gyoshev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Daniel Collier
Top achievements
Rank 1
answered on 18 Mar 2010, 05:37 PM
Here it is.  Thanks for your help.  To clarify the behavior, its sometimes inconsistent, but usually if you moving the mouse drop a dropdown menu really fast, it stays open.  This happens all the time if I use 2010.1.309.  I swapped out for 2009.3.1304 and 1320 and there the menu behaves as it should.  I'm really surpised that you guys cannot reproduce it. I have the zip file ready if you can give me another way to get it to you.

 <%= Html.Telerik().Menu() 
       .Name("Menu") 
       .BindTo("Web") 
%> 

        [PopulateSiteMap(SiteMapName = "Web", ViewDataKey = "Web")] 
        public ActionResult Index() 
        { 
            ViewData["Message"] = "Welcome to ASP.NET MVC!"
 
            if (!SiteMapManager.SiteMaps.ContainsKey("Web")) 
            { 
                SiteMapManager.SiteMaps.Register<XmlSiteMap>("Web", sitmap => sitmap.LoadFrom("~/Web.sitemap")); 
            } 
 
            return View(); 
        } 

0
Atanas Korchev
Telerik team
answered on 19 Mar 2010, 09:54 AM
Hello Daniel Collier,

You can send a working sample to atanas.korchev at telerik.com.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Arnold Smith
Top achievements
Rank 1
answered on 23 Mar 2010, 06:38 PM
Hello,

I'm having the same issue. Sub menu items are not retracting consistently.

Plus, I have two menus on the page. I would expect that if one menu is being used then the other menu would close, and its sub items would retract. That is not happening.

Arnold
0
Alex Gyoshev
Telerik team
answered on 24 Mar 2010, 09:43 AM
Hello Arnold,

We are currently investigating the issue and we'll post our findings in this thread. Daniel has sent us a project that demonstrates the issue (thanks!).

Greetings,
Alex Gyoshev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Alex Gyoshev
Telerik team
answered on 24 Mar 2010, 03:50 PM
Hello Arnold, Daniel,

After investigating the issue, it appears to be a regression from the official release - the patch will be included in the next internal build + service pack. Until then, you can just replace the mouseleave handler within telerik.menu.js (line 120) with the following:

mouseleave: function(e, element) {
    var isBogus = true;
    try { isBogus = !e.relatedTarget.parentNode; } catch (error) {}
     
    if (!this.openOnClick && (isBogus || !$.contains(element, e.relatedTarget))) {
 
        this.triggerEvent('close', $(element));
 
        this.close($(element));
         
        var parentItem = $(element.parentNode).closest('.t-item')[0];
         
        if (parentItem && !$.contains(parentItem, e.relatedTarget))
            this.mouseleave(e, parentItem);
    }
},

Greetings,
Alex Gyoshev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
David
Top achievements
Rank 1
answered on 03 Apr 2010, 06:42 PM
Had same issue, big bummer and this fixed it - THANKS Alex!!!

dave

[pasting link back here from my thread]
0
Makoto
Top achievements
Rank 1
answered on 13 Apr 2010, 08:06 PM
Thanks Alex!  I too was having this issue while using the BindTo() method, pretty much the same way it is on the demo : http://demos.telerik.com/aspnet-mvc/menu/databindingtomodel .

0
Stéphan Parrot
Top achievements
Rank 1
answered on 14 Apr 2010, 07:38 PM
Hello people!
Well, I used the small fix and it works but in my case, only for the root level menu items! If a menu item has children elements, those still have the same "buggy" behavior.
I'm looking at a way to fix this for my needs but I think that by mentioning it in here, Telerik guys will be able to find and fix it for the next release.

Thanks!

Stéphan
0
Doug
Top achievements
Rank 1
answered on 03 May 2010, 06:29 PM
This fixed my issue.
Tags
Menu
Asked by
Daniel Collier
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Daniel Collier
Top achievements
Rank 1
Alex Gyoshev
Telerik team
Arnold Smith
Top achievements
Rank 1
David
Top achievements
Rank 1
Makoto
Top achievements
Rank 1
Stéphan Parrot
Top achievements
Rank 1
Doug
Top achievements
Rank 1
Share this question
or