aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.menu.js
diff options
context:
space:
mode:
authorHans Hillen <hans.hillen@gmail.com>2011-04-22 20:22:56 +0200
committerHans Hillen <hans.hillen@gmail.com>2011-04-22 20:22:56 +0200
commitdc7410f55b4398891e278efec110d1ed5e6f1f92 (patch)
treeba0153c146093136ea575c96b11de14df0a5c389 /ui/jquery.ui.menu.js
parent45c418d29327c83a54c06553ad0f7505ede64cbb (diff)
downloadjquery-ui-dc7410f55b4398891e278efec110d1ed5e6f1f92.tar.gz
jquery-ui-dc7410f55b4398891e278efec110d1ed5e6f1f92.zip
Prevent branch menuitems from firing select event
Diffstat (limited to 'ui/jquery.ui.menu.js')
-rw-r--r--ui/jquery.ui.menu.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js
index 0a06fe0b5..f9ad84fda 100644
--- a/ui/jquery.ui.menu.js
+++ b/ui/jquery.ui.menu.js
@@ -108,9 +108,16 @@ $.widget("ui.menu", {
event.preventDefault();
break;
case $.ui.keyCode.ENTER:
- self.select( event );
+ if (self.active.children("a[aria-haspopup='true']").length) {
+ if (self.right( event )) {
+ event.stopImmediatePropagation();
+ }
+ }
+ else {
+ self.select( event );
+ event.stopImmediatePropagation();
+ }
event.preventDefault();
- event.stopImmediatePropagation();
break;
case $.ui.keyCode.ESCAPE:
if ( self.left( event ) ) {