From: Hans Hillen Date: Fri, 22 Apr 2011 21:11:53 +0000 (+0200) Subject: Fix error for Escape key on menubar item X-Git-Tag: 1.9m5~108^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=42e11d8e41253571d67a7e1a62caa9376771c292;p=jquery-ui.git Fix error for Escape key on menubar item --- diff --git a/tests/visual/menu/menubar.js b/tests/visual/menu/menubar.js index 0fd5d0ecd..8c0bd4904 100644 --- a/tests/visual/menu/menubar.js +++ b/tests/visual/menu/menubar.js @@ -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 );