Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295840

Convert remaining jQuery val replacement not found by eslint

$
0
0

Problem/Motivation

The eslint rules used in #3239134: Refactor (if feasible) uses of the jQuery val function to use VanillaJS is not catching all usage of .val() it is still used in the following files:

core/misc/states.es6.js
        return this.val() === '';
          return this.filter(':checked').val() || false;
        return this.val();
          return this.filter(':checked').val() || false;
        return this.val();

core/modules/ckeditor/js/models/Model.es6.js
        this.get('$textarea').val(

core/modules/color/preview.es6.js
          form.find('.color-palette input[name="palette[base]"]').val(),
          form.find('.color-palette input[name="palette[text]"]').val(),
          form.find('.color-palette input[name="palette[link]"]').val(),
            .val(),
            .val(),

core/modules/filter/filter.filter_html.admin.es6.js
        this.$allowedHTMLFormItem.val(
        this.$allowedHTMLFormItem.val(this._generateSetting(this.userTags));

// This one is a legitimate use
core/modules/quickedit/js/views/EditorView.es6.js
            .val(value);

core/themes/claro/js/vertical-tabs.es6.js
        .val(this.details.attr('id'));

We should also open an issue in the upstream project.

Steps to reproduce

Proposed resolution

Update states.js
Do not change jquery.form.js because it is excluded from eslint

Remaining tasks

Open an issue in the upstream project.

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 295840

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>