diff --git a/core/modules/views_ui/js/views-admin.js b/core/modules/views_ui/js/views-admin.js
index d20b0af..1150661 100644
--- a/core/modules/views_ui/js/views-admin.js
+++ b/core/modules/views_ui/js/views-admin.js
@@ -769,17 +769,20 @@ Drupal.behaviors.viewsFilterConfigSelectAll = {
       .on('click', function () {
         var checked = $(this).is(':checked');
         // Update all checkbox beside the select all checkbox.
-        $(this).parents('.form-checkboxes').find('input[type=checkbox]').each(function () {
-          $(this).attr('checked', checked);
-        });
+        $(this).parents('.form-checkboxes').find('input[type=checkbox]').prop('checked', checked);
       });
     // Uncheck the select all checkbox if any of the others are unchecked.
-    $('#views-ui-config-item-form').find('div.form-type-checkbox').not($('.form-item-options-value-all'))
+    $('#views-ui-config-item-form').find('div.form-type-checkbox').not('.form-item-options-value-all')
       .find('input[type=checkbox]')
       .on('click', function () {
-        if ($(this).is('checked') === false) {
+        if ($(this).prop('checked') === false) {
           $('#edit-options-value-all').prop('checked', false);
         }
+        // Calculate number of unchecked checkboxes.
+        var unchecked = $('.form-item-options-value:visible').find('input[type=checkbox]').not(':checked, #edit-options-value-all').length;
+        if (unchecked === 0) {
+          $('#edit-options-value-all').prop('checked', true);
+        }
       });
   }
 };
