diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2011-04-20 15:35:40 +0200 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2011-04-20 15:35:40 +0200 |
commit | f0d5a0008f193c1ebabd808ff0a9f88455b02658 (patch) | |
tree | 896d23ec3619a4da9441bcabc9812a630a7fca9b /ui/jquery.ui.menu.js | |
parent | 5076f233dbbfc39f29f2be11a9549f262bb471ea (diff) | |
download | jquery-ui-f0d5a0008f193c1ebabd808ff0a9f88455b02658.tar.gz jquery-ui-f0d5a0008f193c1ebabd808ff0a9f88455b02658.zip |
Menu: Make keyboard focus matching take submenus into account
Diffstat (limited to 'ui/jquery.ui.menu.js')
-rw-r--r-- | ui/jquery.ui.menu.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index af1101f73..f233aeeb0 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -132,13 +132,13 @@ $.widget("ui.menu", { function escape(value) { return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } - var match = self.widget().children(".ui-menu-item").filter(function() { + var match = self.activeMenu.children(".ui-menu-item").filter(function() { return new RegExp("^" + escape(character), "i").test($(this).children("a").text()); }); var match = skip && match.index(self.active.next()) != -1 ? self.active.nextAll(".ui-menu-item") : match; if (!match.length) { character = String.fromCharCode(event.keyCode); - match = self.widget().children(".ui-menu-item").filter(function() { + match = self.activeMenu.children(".ui-menu-item").filter(function() { return new RegExp("^" + escape(character), "i").test($(this).children("a").text()); }); } |