@@ -465,7 +465,7 @@ define([
465465 // define whether the target should show up
466466 var shouldShowUp = true ,
467467 idFrom , from , values , isInArray , isNegative , headElement , isInheritCheckboxChecked , target , inputs ,
468- isAnInputOrSelect , currentConfig , rowElement , fromId , radioFrom ;
468+ isAnInputOrSelect , currentConfig , rowElement , fromId , radioFrom , targetArray , isChooser ;
469469
470470 for ( idFrom in valuesFrom ) { //eslint-disable-line guard-for-in
471471 from = $ ( idFrom ) ;
@@ -502,6 +502,12 @@ define([
502502
503503 // Account for the chooser style parameters.
504504 if ( target === null && headElement . length === 0 && idTo . substring ( 0 , 16 ) === 'options_fieldset' ) {
505+ targetArray = $$ ( 'input[id*="' + idTo + '"]' ) ;
506+ isChooser = true ;
507+
508+ if ( targetArray !== null && targetArray . length > 0 ) {
509+ target = targetArray [ 0 ] ;
510+ }
505511 headElement = jQuery ( '.field-' + idTo ) . add ( '.field-chooser' + idTo ) ;
506512 }
507513
@@ -526,7 +532,7 @@ define([
526532 // don't touch hidden inputs (and Use Default inputs too), bc they may have custom logic
527533 if ( ( ! item . type || item . type != 'hidden' ) && ! ( $ ( item . id + '_inherit' ) && $ ( item . id + '_inherit' ) . checked ) && //eslint-disable-line
528534 ! ( currentConfig [ 'can_edit_price' ] != undefined && ! currentConfig [ 'can_edit_price' ] ) && //eslint-disable-line
529- ! item . getAttribute ( 'readonly' ) //eslint-disable-line
535+ ! item . getAttribute ( 'readonly' ) || isChooser //eslint-disable-line
530536 ) {
531537 item . disabled = false ;
532538 jQuery ( item ) . removeClass ( 'ignore-validate' ) ;
0 commit comments