From 7b9813c40ec7f0abde791d97b9343b075ecd3ce8 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Wed, 12 Oct 2011 02:10:31 +0200 Subject: [PATCH] Selectmenu: improved event handling, fixed tabindex when disabled --- ui/jquery.ui.selectmenu.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 59cd24006..05104de93 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -302,8 +302,7 @@ $.widget( "ui.selectmenu", { event.stopImmediatePropagation(); }, click: function( event ) { - // return false needed to prevent browser from following the anchor - return false; + event.preventDefault(); }, keydown: function( event ) { switch (event.keyCode) { @@ -367,7 +366,7 @@ $.widget( "ui.selectmenu", { this.button.attr( "tabindex", -1 ); } else { this.element.removeAttr( "disabled" ); - this.button.attr( "tabindex", 1 ); + this.button.attr( "tabindex", 0 ); } this.menu.attr( "aria-disabled", value ); this.close();