diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-01-13 16:48:56 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-01-13 16:48:56 -0500 |
commit | 4e7aa53e3e4f56253045bc9db0523da2753e7095 (patch) | |
tree | e002679887372ac8a892769789d4a09b97280cab /ui | |
parent | b22c69b949b6d807af0124fa481017bfff57f37b (diff) | |
download | jquery-ui-4e7aa53e3e4f56253045bc9db0523da2753e7095.tar.gz jquery-ui-4e7aa53e3e4f56253045bc9db0523da2753e7095.zip |
Accordion: Use event.preventDefault() instead of return false when handling keydown.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.accordion.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 8b7c1f3a4..58a506923 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -87,9 +87,7 @@ $.widget( "ui.accordion", { self.headers .attr( "role", "tab" ) - .bind( "keydown.accordion", function( event ) { - return self._keydown( event ); - }) + .bind( "keydown.accordion", $.proxy( self, "_keydown" ) ) .next() .attr( "role", "tabpanel" ); @@ -221,10 +219,8 @@ $.widget( "ui.accordion", { $( event.target ).attr( "tabIndex", -1 ); $( toFocus ).attr( "tabIndex", 0 ); toFocus.focus(); - return false; + event.preventDefault(); } - - return true; }, resize: function() { |