@@ -11731,7 +11731,7 @@ var getFieldPatternRegex = exports.getFieldPatternRegex = function getFieldPatte
11731
11731
};
11732
11732
11733
11733
/**
11734
- * Get a field based on it's name hierarchy
11734
+ * Get a field based on its name hierarchy
11735
11735
* This is a direct translation of Container::get_field_by_name from php
11736
11736
*
11737
11737
* @return {Object}
@@ -11795,7 +11795,7 @@ var getFieldByHierarchy = exports.getFieldByHierarchy = function getFieldByHiera
11795
11795
};
11796
11796
11797
11797
/**
11798
- * Get a field's hierarchy name based on it's id
11798
+ * Get a field's hierarchy name based on its id
11799
11799
*
11800
11800
* @return {Object}
11801
11801
*/
@@ -14180,7 +14180,7 @@ function workerFormSubmit() {
14180
14180
14181
14181
case 4:
14182
14182
if (false) {
14183
- _context3.next = 29 ;
14183
+ _context3.next = 31 ;
14184
14184
break;
14185
14185
}
14186
14186
@@ -14192,49 +14192,60 @@ function workerFormSubmit() {
14192
14192
_event = _ref3.event;
14193
14193
widgetId = getWidgetId((0, _jquery2.default)(_event.target).closest('.widget-inside').get(0));
14194
14194
containerId = widgetIdToContainerId(widgetId);
14195
- _context3.next = 13;
14196
- return (0, _effects.put)((0, _actions.submitForm)(_event));
14195
+
14196
+ // Don't care about other widgets.
14197
+
14198
+ if ((0, _lodash.startsWith)(widgetId, carbonWidgetIdPrefix)) {
14199
+ _context3.next = 13;
14200
+ break;
14201
+ }
14202
+
14203
+ return _context3.abrupt('continue', 4);
14197
14204
14198
14205
case 13:
14199
14206
_context3.next = 15;
14200
- return (0, _effects.put)((0, _actions.validateContainer)(containerId, _event));
14207
+ return (0, _effects.put)((0, _actions.submitForm)( _event));
14201
14208
14202
14209
case 15:
14210
+ _context3.next = 17;
14211
+ return (0, _effects.put)((0, _actions.validateContainer)(containerId, _event));
14212
+
14213
+ case 17:
14203
14214
if (!(pagenow === _constants.PAGE_NOW_CUSTOMIZE)) {
14204
- _context3.next = 27 ;
14215
+ _context3.next = 29 ;
14205
14216
break;
14206
14217
}
14207
14218
14208
14219
_event.preventDefault();
14209
14220
14210
14221
// This little delay allows us to get correct results in the selector for invalid fields
14211
14222
// since we don't know when the validation is completed.
14212
- _context3.next = 19 ;
14223
+ _context3.next = 21 ;
14213
14224
return (0, _effects.call)(_reduxSaga.delay, 250);
14214
14225
14215
- case 19 :
14216
- _context3.next = 21 ;
14226
+ case 21 :
14227
+ _context3.next = 23 ;
14217
14228
return (0, _effects.select)(_selectors2.hasInvalidFields);
14218
14229
14219
- case 21 :
14230
+ case 23 :
14220
14231
if (_context3.sent) {
14221
- _context3.next = 27 ;
14232
+ _context3.next = 29 ;
14222
14233
break;
14223
14234
}
14224
14235
14225
- _context3.next = 24 ;
14236
+ _context3.next = 26 ;
14226
14237
return (0, _effects.call)(wp.customize.Widgets.getWidgetFormControlForWidget, containerId);
14227
14238
14228
- case 24 :
14239
+ case 26 :
14229
14240
_widget = _context3.sent;
14230
- _context3.next = 27 ;
14241
+ _context3.next = 29 ;
14231
14242
return (0, _effects.call)([_widget, _widget.updateWidget], { disable_form: true });
14232
14243
14233
- case 27 :
14244
+ case 29 :
14234
14245
_context3.next = 4;
14235
14246
break;
14236
14247
14237
- case 29 :
14248
+ case 31 :
14238
14249
case 'end':
14239
14250
return _context3.stop();
14240
14251
}
@@ -15454,7 +15465,7 @@ function patchTagBoxAPI(tagBox, method) {
15454
15465
}
15455
15466
15456
15467
/**
15457
- * Get select option's level based on it's className
15468
+ * Get select option's level based on its className
15458
15469
*
15459
15470
* @param {Object} option
15460
15471
* @return {Number}
@@ -15933,7 +15944,7 @@ function prepareValueForField(fieldId, attachment) {
15933
15944
}
15934
15945
15935
15946
/**
15936
- * Set a field's value depending on it's value_type property
15947
+ * Set a field's value depending on its value_type property
15937
15948
*
15938
15949
* @param {String} fieldId
15939
15950
* @param {Object} attachment
0 commit comments