Merge "Avoid :checkbox Sizzle selector"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 30 Jun 2019 15:43:33 +0000 (15:43 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 30 Jun 2019 15:43:33 +0000 (15:43 +0000)
resources/src/mediawiki.rcfilters/ui/FormWrapperWidget.js
resources/src/mediawiki.special.mute.js

index 7d69fb6..5d6eaef 100644 (file)
@@ -71,7 +71,7 @@ FormWrapperWidget.prototype.onFormSubmit = function ( e ) {
        $( e.target ).find( 'input:not([type="hidden"],[type="submit"]), select' ).each( function () {
                var value = '';
 
-               if ( !$( this ).is( ':checkbox' ) || $( this ).is( ':checked' ) ) {
+               if ( !$( this ).is( '[type="checkbox"]' ) || $( this ).is( ':checked' ) ) {
                        value = $( this ).val();
                }
 
index 3d494d0..b9dcc21 100644 (file)
@@ -2,7 +2,7 @@
        'use strict';
 
        $( function () {
-               var $inputs = $( '#mw-specialmute-form input:checkbox' ),
+               var $inputs = $( '#mw-specialmute-form input[type="checkbox"]' ),
                        saveButton, $saveButton = $( '#save' );
 
                function isFormChanged() {