I actually believe the fault here lies with TableListField.php. In 2.4.5, the Headings() function lines 335 to 339 are:
if(!empty($_REQUEST['ctf'][$this->Name()]['sort']) && ($_REQUEST['ctf'][$this->Name()]['sort'] == $fieldName)) {
$dir = isset($_REQUEST['ctf'][$this->Name()]['dir']) ? $_REQUEST['ctf'][$this->Name()]['dir'] : null;
$dir = trim(strtolower($dir));
$newDir = ($dir == 'desc') ? null : 'desc';
$sortLink = HTTP::setGetVar("ctf[{$this->Name()}][dir]", Convert::raw2xml($newDir), $sortLink,'&');
}
whereas changing all instances of ['dir'] to ['sort_dir'] re-enables DOM sorting functionality, like so:
if(!empty($_REQUEST['ctf'][$this->Name()]['sort']) && ($_REQUEST['ctf'][$this->Name()]['sort'] == $fieldName)) {
$dir = isset($_REQUEST['ctf'][$this->Name()]['sort_dir']) ? $_REQUEST['ctf'][$this->Name()]['sort_dir'] : null;
$dir = trim(strtolower($dir));
$newDir = ($dir == 'desc') ? null : 'desc';
$sortLink = HTTP::setGetVar("ctf[{$this->Name()}][dir]", Convert::raw2xml($newDir), $sortLink,'&');
}
What this doesn't solve however, is the fact that once I've clicked any column headings in the DOM, I then get the 'are you sure you want to navigate away from this page' prompt, even though no changes to data have occurred... I'm trawling through LeftAndMain_right.js and although I've found the 'confirmation' variables in the autoSave function, I don't want to disable confirmation in general.
Tips greatly appreciated.