aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2011-09-28 21:13:14 +0200
committerFelix Nagel <info@felixnagel.com>2011-09-28 21:13:14 +0200
commit3e1557b654e88852ef405422d13eb035dc33e929 (patch)
treee35c44eadf983bfe4617976d25a8cdb30a9a05e3
parentfd69abb8d05b3ac8273834f33e9b02b8d9be3632 (diff)
downloadjquery-ui-3e1557b654e88852ef405422d13eb035dc33e929.tar.gz
jquery-ui-3e1557b654e88852ef405422d13eb035dc33e929.zip
Selectmenu: changed from return false to event.preventDefault()
-rw-r--r--ui/jquery.ui.selectmenu.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index a3a81ddcc..74ef8fa0a 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/ui/jquery.ui.selectmenu.js
@@ -100,18 +100,17 @@ $.widget( "ui.selectmenu", {
return false;
},
'keydown.selectmenu': function( event ) {
- var ret = true;
switch (event.keyCode) {
case $.ui.keyCode.TAB:
if ( self.opened ) self.close();
break;
case $.ui.keyCode.ENTER:
if ( self.opened ) self.list.menu( "select", self._getSelectedItem() );
- ret = false;
+ event.preventDefault();
break;
case $.ui.keyCode.SPACE:
self._toggle(event);
- ret = false;
+ event.preventDefault();
break;
case $.ui.keyCode.UP:
if ( event.altKey ) {
@@ -119,7 +118,7 @@ $.widget( "ui.selectmenu", {
} else {
self._move( "previous", event );
}
- ret = false;
+ event.preventDefault();
break;
case $.ui.keyCode.DOWN:
if ( event.altKey ) {
@@ -127,20 +126,19 @@ $.widget( "ui.selectmenu", {
} else {
self._move( "next", event );
}
- ret = false;
+ event.preventDefault();
break;
case $.ui.keyCode.LEFT:
self._move( "previous", event );
- ret = false;
+ event.preventDefault();
break;
case $.ui.keyCode.RIGHT:
self._move( "next", event );
- ret = false;
+ event.preventDefault();
break;
default:
self.list.trigger( event );
}
- return ret;
}
});