Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested Menu not closing on hover out #36

Closed
dashawk opened this issue Jan 19, 2016 · 6 comments
Closed

Nested Menu not closing on hover out #36

dashawk opened this issue Jan 19, 2016 · 6 comments

Comments

@dashawk
Copy link

dashawk commented Jan 19, 2016

I have a nested menu example here.

The issue is that, when you hover to a nested menu item, it will display the sub menu items, but if you hover to another menu item which is not a nested menu, then recently opened sub menu of the previous menu is still open.

Is there a way to close the sub menus if we hover away to the parent menu item?

@Templarian
Copy link
Owner

Yea, I'm coding a fix for this before the next release (next release will include #4's changes in it also).

@dashawk
Copy link
Author

dashawk commented Jan 19, 2016

Hi,

I just solved the issue.

I just updated this block (Temporary Fix):

$li.on('mouseover', function ($event) {
    $scope.$apply(function () {
        if (nestedMenu) {
            openNestedMenu($event);
        } else {
            $(event.currentTarget).removeClass('context');
            removeContextMenus(level + 1);
        }
    });
});

Here is what My menu Looks like:
menu

madmas added a commit to madmas/ui.bootstrap.contextMenu that referenced this issue Jan 21, 2016
@madmas
Copy link
Contributor

madmas commented Jan 21, 2016

@dashawk, I adapted your snippet into a PR :-)
@Templarian do you think thats sufficient or did you have another solution in mind?

@Templarian
Copy link
Owner

@madmas I had a slightly different solution (very similar actually), but It involves waiting 0.5 seconds of hover off to close the menu similar to how it works on desktop, but I need to test the idea to make sure it works on touch okay.

This allows the mouse to quickly move off and back on without instantly closing the menu.

@KuroNoDev
Copy link

any luck with this?

@dashawk
Copy link
Author

dashawk commented Jan 11, 2017

Thanks guys for the inputs. I will close this issue now but if you have any other additions, feel free to reopen.

@dashawk dashawk closed this as completed Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants