diff --git a/core/misc/tableselect.js b/core/misc/tableselect.js
index 3b1330f2a8d17353287cd208706a9b55546204c4..36af8647d4b1340554a2d259f7e179b6163f1d2e 100644
--- a/core/misc/tableselect.js
+++ b/core/misc/tableselect.js
@@ -75,9 +75,7 @@ Drupal.tableSelectRange = function (from, to, state) {
     $i = $(i);
     // Either add or remove the selected class based on the state of the target checkbox.
     $i.toggleClass('selected', state);
-    $i.find('input:checkbox').each(function () {
-      this.checked = state;
-    });
+    $i.find('input:checkbox').attr('checked', state);
 
     if (to.nodeType) {
       // If we are at the end of the range, stop.