Accordion: Use event.preventDefault() instead of return false when handling keydown.

This commit is contained in:
Scott González 2011-01-13 16:48:56 -05:00
parent b22c69b949
commit 4e7aa53e3e

View File

@ -87,9 +87,7 @@ $.widget( "ui.accordion", {
self.headers self.headers
.attr( "role", "tab" ) .attr( "role", "tab" )
.bind( "keydown.accordion", function( event ) { .bind( "keydown.accordion", $.proxy( self, "_keydown" ) )
return self._keydown( event );
})
.next() .next()
.attr( "role", "tabpanel" ); .attr( "role", "tabpanel" );
@ -221,10 +219,8 @@ $.widget( "ui.accordion", {
$( event.target ).attr( "tabIndex", -1 ); $( event.target ).attr( "tabIndex", -1 );
$( toFocus ).attr( "tabIndex", 0 ); $( toFocus ).attr( "tabIndex", 0 );
toFocus.focus(); toFocus.focus();
return false; event.preventDefault();
} }
return true;
}, },
resize: function() { resize: function() {