diff --git a/core/misc/tableselect.js b/core/misc/tableselect.js
index a55b97c..fa7b90b 100644
--- a/core/misc/tableselect.js
+++ b/core/misc/tableselect.js
@@ -60,6 +60,10 @@
       // Keep track of the last checked checkbox.
       lastChecked = e.target;
     });
+
+    // If all checkboxes are checked on page load, make sure the select-all one is
+    // checked too, otherwise keep unchecked.
+    updateSelectAll((checkboxes.length === checkboxes.filter(':checked').length));
   };
 
   Drupal.tableSelectRange = function (from, to, state) {
