_fnStringToCss handling for an object

_fnStringToCss handling for an object

wkrzystekwkrzystek Posts: 2Questions: 0Answers: 0
edited February 2013 in Bug reports
Using Jquery 1.8.2 and datatables 1.9.4, ran into a bug where my column header widths weren't matching the column widths of the table. It was crashing on line 3879 where s didn't have a method charCodeAt. In debugging, s was being passed as an object.

My fix was to add:
[code]
if (typeof s == 'object') {
return s;
}
[/code]

I'm not sure I can figure out exactly why but this was the value of s:

s: jQuery.fn.jQuery.init[1]
0: table.grdDataTable dataTable
context: table.grdDataTable dataTable
length: 1
__proto__: Object[0]

Replies

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin
    We've seen this occur if you use an old version of jQuery UI. Are you using jQuery UI and if so, what version?

    Allan
  • wkrzystekwkrzystek Posts: 2Questions: 0Answers: 0
    We're using jQuery UI 1.8.16. Seems like the outerWidth() calls are the problem. They are being called without a false parameter. http://bugs.jquery.com/ticket/12491
  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin
    Thanks for the link confirming that it is an old version of jQuery UI that causes this issue. Not something that I'll make any changes for in DataTables.

    Allan
This discussion has been closed.