]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Use event.preventDefault() instead of return false when handling keydown.
authorScott González <scott.gonzalez@gmail.com>
Thu, 13 Jan 2011 21:48:56 +0000 (16:48 -0500)
committerScott González <scott.gonzalez@gmail.com>
Thu, 13 Jan 2011 21:48:56 +0000 (16:48 -0500)
ui/jquery.ui.accordion.js

index 8b7c1f3a4bc0a13aa5ee366e76b04037017a6ebf..58a50692303bb8eb1e3a06ee9371a4b131dc0bae 100644 (file)
@@ -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() {