diff --git a/lib/picker.js b/lib/picker.js index 7cfac025..e8dfcaa2 100644 --- a/lib/picker.js +++ b/lib/picker.js @@ -708,7 +708,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) { // Re-focus onto the holder so that users can click away // from elements focused within the picker. - P.$holder[0].focus() + P.$holder.eq(0).focus() } } } @@ -729,7 +729,7 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) { // If it’s disabled or nothing inside is actively focused, re-focus the element. if ( targetDisabled || activeElement && !$.contains( P.$root[0], activeElement ) ) { - P.$holder[0].focus() + P.$holder.eq(0).focus() } // If something is superficially changed, update the `highlight` based on the `nav`. @@ -814,12 +814,12 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) { if (IS_DEFAULT_THEME && supportsTransitions) { P.$holder.find('.' + CLASSES.frame).one('transitionend', function() { - P.$holder[0].focus() + P.$holder.eq(0).focus() }) } else { setTimeout(function() { - P.$holder[0].focus() + P.$holder.eq(0).focus() }, 0) } }