HtmlTable (sortable) - Mixed column requires multiple clicks to sort #1039

ghost opened this Issue Sep 27, 2011 · 0 comments

0 participants


Maybe I'm not understanding the documentation correctly, but when I create an HtmlTable and make it sortable, mixed columns do not sort correctly. I have included an example below to try. If you click the first column, it takes two clicks to make it sort with mixed content (alpha and numbers). If you click the second column, it only takes one because it's the same data type. Same goes for the third. I added a TH background color change as a visual queue on when the sort takes place. It would be great if I'm just missing something. I have confirmed this on 1.3 as well.

Example code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sort Test</title>
<style type="text/css">
th {
    cursor: pointer;
.table-th-sort-rev {
    background-color: #CCC; 
<script type="text/javascript" src="mootools-core-1.4.0.js"></script>
<script type="text/javascript" src="mootools-more-1.4.0.js"></script>
<script type="text/javascript">
window.addEvent('domready', function(){

    new HtmlTable($('test'), {
        sortable: true



<table id="test" border="1">
      <td>Text here</td>
      <td>more text</td>
      <td>Lorem Ipsum</td>
      <td>isn't this fun?</td>


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment