]> source.dussan.org Git - jquery-ui.git/commitdiff
Fix error for Escape key on menubar item
authorHans Hillen <hans.hillen@gmail.com>
Fri, 22 Apr 2011 21:11:53 +0000 (23:11 +0200)
committerHans Hillen <hans.hillen@gmail.com>
Fri, 22 Apr 2011 21:11:53 +0000 (23:11 +0200)
tests/visual/menu/menubar.js

index 0fd5d0ecd8ba04ed14995c9258458bace842ea83..8c0bd49046eaac80ab0da659f54dfb8880695217 100644 (file)
@@ -104,7 +104,7 @@ $.widget("ui.menubar", {
                self._bind({
                        keydown: function(event) {
                                if (event.keyCode == $.ui.keyCode.ESCAPE) {
-                                       if (self.active.menu("left", event) !== true) {
+                                       if (self.active && self.active.menu("left", event) !== true) {
                                                var active = self.active;
                                                self.active.blur();
                                                self._close( event );