Skip to content

Commit

Permalink
Merge pull request #90 from dennismorello/master
Browse files Browse the repository at this point in the history
Sub-menus autoclose when their focus is lost

Should be in v1.0.1
  • Loading branch information
josetaira authored Sep 30, 2017
2 parents 91fe4fb + 85bc80d commit e921554
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ angular.module('ui.bootstrap.contextMenu', [])
});
};

$ul.on('mouseleave', function ($event) {
if (level > 0) {
removeContextMenus(level);
}
});

$li.on('click', function ($event) {
if($event.which == 1) {
$event.preventDefault();
Expand Down

0 comments on commit e921554

Please sign in to comment.