diff --git a/misc/tabledrag.js b/misc/tabledrag.js
index 8d378e2cc93779ffba5496c9207243633f6e6be2..6dcc28092571294dd72ed78ec99f29c9d56a89d8 100644
--- a/misc/tabledrag.js
+++ b/misc/tabledrag.js
@@ -516,7 +516,7 @@ Drupal.tableDrag.prototype.getMouseOffset = function (target, event) {
  *   The y coordinate of the mouse on the page (not the screen).
  */
 Drupal.tableDrag.prototype.findDropTargetRow = function (x, y) {
-  var rows = this.table.tBodies[0].rows;
+  var rows = $(this.table.tBodies[0].rows).not(':hidden');
   for (var n = 0; n < rows.length; n++) {
     var row = rows[n];
     var indentDiff = 0;