diff --git a/core/misc/tableselect.js b/core/misc/tableselect.js
index b3ab4c4..b12a2c8 100644
--- a/core/misc/tableselect.js
+++ b/core/misc/tableselect.js
@@ -60,6 +60,10 @@ Drupal.tableSelect = function () {
     // 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) {
