From: Scott González Date: Thu, 13 Jan 2011 21:48:56 +0000 (-0500) Subject: Accordion: Use event.preventDefault() instead of return false when handling keydown. X-Git-Tag: 1.9m4~64 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4e7aa53e3e4f56253045bc9db0523da2753e7095;p=jquery-ui.git Accordion: Use event.preventDefault() instead of return false when handling keydown. --- 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() {