From 5636e964fa0ee24034dc4217e48c9bc1e06f0d7c Mon Sep 17 00:00:00 2001 From: Rodney Rehm Date: Thu, 7 Jun 2012 20:26:44 +0200 Subject: [PATCH] fixing Issue #53 - html5 `` import --- README.md | 4 ++++ src/jquery.contextMenu.js | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d00b4ef..a8639dd9 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,10 @@ $.contextMenu is published under the [MIT license](http://www.opensource.org/lic ## Changelog ## +### 1.5.18 ### + +* fixing html5 `` import (Issue #53) + ### 1.5.17 ### * fixing `options` to default to `options.trigger = "right"` diff --git a/src/jquery.contextMenu.js b/src/jquery.contextMenu.js index faa53e59..95265b86 100755 --- a/src/jquery.contextMenu.js +++ b/src/jquery.contextMenu.js @@ -1397,7 +1397,7 @@ function menuChildren(items, $children, counter) { // http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#the-menu-element case 'menu': item = {name: $node.attr('label'), items: {}}; - menuChildren(item.items, $node.children(), counter); + counter = menuChildren(item.items, $node.children(), counter); break; // 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) { items['key' + counter] = item; } }); + + return counter; } // convert html5 menu