1(function ($, once) { 2 /** 3 * Invalid event handler for input elements in Tab field group. 4 */ 5 const onTabInvalid = function (e) { 6 $(e.target) 7 .parents('details ') 8 .children( 9 'summary[aria-expanded=false]:not(.horizontal-tabs-pane > summary, .vertical-tabs__pane > summary)', 10 ) 11 .parent() 12 .attr('open', 'open'); 13 }; 14 15 /** 16 * Make sure tab field groups which contain invalid data are expanded when 17 * they first load, and also when someone clicks the submit button. 18 */ 19 Drupal.behaviors.fieldGroupTabValidation = { 20 attach(context) { 21 $( 22 once( 23 'field-group-tab-validation', 24 $('.field-group-tab :input', context), 25 ), 26 ).on('invalid.field_group', onTabInvalid); 27 }, 28 }; 29})(jQuery, once);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.