@@ -465,7 +465,7 @@ define([
465
465
// define whether the target should show up
466
466
var shouldShowUp = true ,
467
467
idFrom , from , values , isInArray , isNegative , headElement , isInheritCheckboxChecked , target , inputs ,
468
- isAnInputOrSelect , currentConfig , rowElement , fromId , radioFrom ;
468
+ isAnInputOrSelect , currentConfig , rowElement , fromId , radioFrom , targetArray , isChooser ;
469
469
470
470
for ( idFrom in valuesFrom ) { //eslint-disable-line guard-for-in
471
471
from = $ ( idFrom ) ;
@@ -502,6 +502,12 @@ define([
502
502
503
503
// Account for the chooser style parameters.
504
504
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
+ }
505
511
headElement = jQuery ( '.field-' + idTo ) . add ( '.field-chooser' + idTo ) ;
506
512
}
507
513
@@ -526,7 +532,7 @@ define([
526
532
// don't touch hidden inputs (and Use Default inputs too), bc they may have custom logic
527
533
if ( ( ! item . type || item . type != 'hidden' ) && ! ( $ ( item . id + '_inherit' ) && $ ( item . id + '_inherit' ) . checked ) && //eslint-disable-line
528
534
! ( 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
530
536
) {
531
537
item . disabled = false ;
532
538
jQuery ( item ) . removeClass ( 'ignore-validate' ) ;
0 commit comments