diff --git a/Scripts/bootstrap-sortable.js b/Scripts/bootstrap-sortable.js index c75df78..c849554 100644 --- a/Scripts/bootstrap-sortable.js +++ b/Scripts/bootstrap-sortable.js @@ -123,7 +123,7 @@ var colspan = $this.attr('colspan'); if (colspan) { - var mainSort = parseFloat($this.data('mainsort')) || 0; + var mainSort = Math.min(colspan - 1, parseFloat($this.data('mainsort')) || 0); var rowIndex = parseFloat($this.data('sortkey').split('-').pop()); // If there is one more row in header, delve deeper