Skip to content

Commit 5636e96

Browse files
committed
fixing Issue swisnl#53 - html5 <menu> import
1 parent 8786bdc commit 5636e96

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ $.contextMenu is published under the [MIT license](http://www.opensource.org/lic
103103

104104
## Changelog ##
105105

106+
### 1.5.18 ###
107+
108+
* fixing html5 `<menu>` import (Issue #53)
109+
106110
### 1.5.17 ###
107111

108112
* fixing `options` to default to `options.trigger = "right"`

src/jquery.contextMenu.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ function menuChildren(items, $children, counter) {
13971397
// http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#the-menu-element
13981398
case 'menu':
13991399
item = {name: $node.attr('label'), items: {}};
1400-
menuChildren(item.items, $node.children(), counter);
1400+
counter = menuChildren(item.items, $node.children(), counter);
14011401
break;
14021402

14031403
// http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#using-the-a-element-to-define-a-command
@@ -1527,6 +1527,8 @@ function menuChildren(items, $children, counter) {
15271527
items['key' + counter] = item;
15281528
}
15291529
});
1530+
1531+
return counter;
15301532
}
15311533

15321534
// convert html5 menu

0 commit comments

Comments
 (0)