mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Selectmenu: rename var to focusIndex
This commit is contained in:
parent
5e9ad9b434
commit
0631d7666f
4
ui/jquery.ui.selectmenu.js
vendored
4
ui/jquery.ui.selectmenu.js
vendored
@ -135,13 +135,13 @@ $.widget( "ui.selectmenu", {
|
||||
var item = ui.item.data( "ui-selectmenu-item" );
|
||||
|
||||
// prevent inital focus from firing and checks if its a newly focused item
|
||||
if ( !that.isOpen && that.focus !== undefined && item.index !== that.focus ) {
|
||||
if ( !that.isOpen && that.focusIndex !== undefined && item.index !== that.focusIndex ) {
|
||||
that._trigger( "focus", event, { item: item } );
|
||||
if ( !that.isOpen ) {
|
||||
that._select( item, event );
|
||||
}
|
||||
}
|
||||
that.focus = item.index;
|
||||
that.focusIndex = item.index;
|
||||
|
||||
// Set ARIA active descendant
|
||||
that.button.attr( "aria-activedescendant", that.menuItems.eq( item.index ).attr( "id" ) );
|
||||
|
Loading…
Reference in New Issue
Block a user