diff --git a/core/misc/machine-name.js b/core/misc/machine-name.js index 2b304bf..688c4b6 100644 --- a/core/misc/machine-name.js +++ b/core/misc/machine-name.js @@ -85,21 +85,21 @@ } Object.keys(settings.machineName).forEach(function (source_id) { var machine = ''; var eventData; var options = settings.machineName[source_id]; var $source = $context.find(source_id).addClass('machine-name-source').once('machine-name'); var $target = $context.find(options.target).addClass('machine-name-target'); var $suffix = $context.find(options.suffix); - var $wrapper = $target.closest('.form-item'); + var $wrapper = $target.closest('.js-form-item'); // All elements have to exist. if (!$source.length || !$target.length || !$suffix.length || !$wrapper.length) { return; } // Skip processing upon a form validation error on the machine name. if ($target.hasClass('error')) { return; } // Figure out the maximum length for the machine name. options.maxlength = $target.attr('maxlength'); diff --git a/core/misc/states.js b/core/misc/states.js index 9472848..b88145a 100644 --- a/core/misc/states.js +++ b/core/misc/states.js @@ -589,46 +589,46 @@ * bubble up to these handlers. We use this system so that themes and modules * can override these state change handlers for particular parts of a page. */ $(document).on('state:disabled', function (e) { // Only act when this change was triggered by a dependency and not by the // element monitoring itself. if (e.trigger) { $(e.target) .prop('disabled', e.value) - .closest('.form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value) + .closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value) .find('select, input, textarea').prop('disabled', e.value); // Note: WebKit nightlies don't reflect that change correctly. // See https://bugs.webkit.org/show_bug.cgi?id=23789 } }); $(document).on('state:required', function (e) { if (e.trigger) { if (e.value) { - var $label = $(e.target).attr({'required': 'required', 'aria-required': 'aria-required'}).closest('.form-item, .js-form-wrapper').find('label'); + var $label = $(e.target).attr({'required': 'required', 'aria-required': 'aria-required'}).closest('.js-form-item, .js-form-wrapper').find('label'); // Avoids duplicate required markers on initialization. if (!$label.hasClass('form-required').length) { $label.addClass('form-required'); } } else { - $(e.target).removeAttr('required aria-required').closest('.form-item, .js-form-wrapper').find('label.form-required').removeClass('form-required'); + $(e.target).removeAttr('required aria-required').closest('.js-form-item, .js-form-wrapper').find('label.form-required').removeClass('form-required'); } } }); $(document).on('state:visible', function (e) { if (e.trigger) { - $(e.target).closest('.form-item, .js-form-submit, .js-form-wrapper').toggle(e.value); + $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggle(e.value); } }); $(document).on('state:checked', function (e) { if (e.trigger) { $(e.target).prop('checked', e.value); } }); $(document).on('state:collapsed', function (e) { diff --git a/core/modules/filter/filter.filter_html.admin.js b/core/modules/filter/filter.filter_html.admin.js index 1a20cfa..fa04df5 100644 --- a/core/modules/filter/filter.filter_html.admin.js +++ b/core/modules/filter/filter.filter_html.admin.js @@ -64,21 +64,21 @@ // The auto-created tag list thus far added. autoTags: null, // Track which new features have been added to the text editor. newFeatures: {}, attach: function (context, settings) { var that = this; $(context).find('[name="filters[filter_html][settings][allowed_html]"]').once('filter-filter_html-updating').each(function () { that.$allowedHTMLFormItem = $(this); - that.$allowedHTMLDescription = that.$allowedHTMLFormItem.closest('.form-item').find('.description'); + that.$allowedHTMLDescription = that.$allowedHTMLFormItem.closest('.js-form-item').find('.description'); that.userTags = that._parseSetting(this.value); // Update the new allowed tags based on added text editor features. $(document) .on('drupalEditorFeatureAdded', function (e, feature) { that.newFeatures[feature.name] = feature.rules; that._updateAllowedTags(); }) .on('drupalEditorFeatureModified', function (e, feature) { if (that.newFeatures.hasOwnProperty(feature.name)) { diff --git a/core/modules/filter/templates/text-format-wrapper.html.twig b/core/modules/filter/templates/text-format-wrapper.html.twig index 367de09..de61d92 100644 --- a/core/modules/filter/templates/text-format-wrapper.html.twig +++ b/core/modules/filter/templates/text-format-wrapper.html.twig @@ -8,16 +8,16 @@ * - description: Text format element description. * - attributes: HTML attributes for the containing element. * - aria_description: Flag for whether or not an ARIA description has been * added to the description container. * * @see template_preprocess_text_format_wrapper() * * @ingroup themeable */ #} -