Skip to content

Commit 4e7aa53

Browse files
committed
Accordion: Use event.preventDefault() instead of return false when handling keydown.
1 parent b22c69b commit 4e7aa53

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ui/jquery.ui.accordion.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ $.widget( "ui.accordion", {
8787

8888
self.headers
8989
.attr( "role", "tab" )
90-
.bind( "keydown.accordion", function( event ) {
91-
return self._keydown( event );
92-
})
90+
.bind( "keydown.accordion", $.proxy( self, "_keydown" ) )
9391
.next()
9492
.attr( "role", "tabpanel" );
9593

@@ -221,10 +219,8 @@ $.widget( "ui.accordion", {
221219
$( event.target ).attr( "tabIndex", -1 );
222220
$( toFocus ).attr( "tabIndex", 0 );
223221
toFocus.focus();
224-
return false;
222+
event.preventDefault();
225223
}
226-
227-
return true;
228224
},
229225

230226
resize: function() {

0 commit comments

Comments
 (0)