mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Accordion: Use event.preventDefault() instead of return false when handling keydown.
This commit is contained in:
parent
b22c69b949
commit
4e7aa53e3e
8
ui/jquery.ui.accordion.js
vendored
8
ui/jquery.ui.accordion.js
vendored
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user