Skip to content

Commit d1dc973

Browse files
committed
First fix, hover parent also if hovering submenu node. (issue 523)
1 parent 195b0c7 commit d1dc973

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/jquery.contextMenu.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,7 @@
836836
return;
837837
}
838838

839+
839840
$this.trigger('contextmenu:focus');
840841
},
841842
// :hover done manually so key handling is possible
@@ -924,6 +925,11 @@
924925
// remember selected
925926
opt.$selected = root.$selected = $this;
926927

928+
929+
if(opt && opt.$node && opt.$node.hasClass('context-menu-submenu')){
930+
opt.$node.addClass(root.classNames.hover);
931+
}
932+
927933
// position sub-menu - do after show so dumb $.ui.position can keep up
928934
if (opt.$node) {
929935
root.positionSubmenu.call(opt.$node, opt.$menu);
@@ -1092,6 +1098,7 @@
10921098
if (typeof root === 'undefined') {
10931099
root = opt;
10941100
}
1101+
10951102
// create contextMenu
10961103
opt.$menu = $('<ul class="context-menu-list"></ul>').addClass(opt.className || '').data({
10971104
'contextMenu': opt,

0 commit comments

Comments
 (0)