DataTables / FixedHeader

Fix the header, footer, left or right columns of a table in place, to always show them when scrolling
http://www.datatables.net/
Other
75 stars 83 forks source link

Fix namespace closure. #65

Closed KedneckInc closed 9 years ago

KedneckInc commented 9 years ago

On Chrome, the following causes an exception:

$('#example').DataTable({
                 destroy: true,
                 dom: "tlp",
                 fixedHeader: {
                     header: true
                 }
             });

The 'that.s.namespace' reference in FixedHeader fails because 's' does not exist. This patch replaces 'that.s.namespace' with a simple variable, which does work.

DataTables commented 9 years ago

Why doesthat.s not exist? It should and appears to do so. Example: http://live.datatables.net/moseyuta/1/edit

KedneckInc commented 9 years ago

This is embarrassing. I went back to my original code, put the unmodified CDN for 3.0.0 in place of my modified copy, and the problem no longer occurs. I have no idea why. It was consistent enough that I could track it down to the 'that.s.namespace' reference, and repeatable, now it doesn't happen at all. I'll keep working the issue, but for now, disregard.

DataTables commented 9 years ago

3.0.0 release most certainly did have a related issue. But the version in this repo shouldn't have it.

KedneckInc commented 9 years ago

Okay, got it figured out. It was the 3.0.0 CDN, and the problem does occur, but you're right, it doesn't occur with the nightly build. Thanks! Sorry for troubling you!

DataTables commented 9 years ago

No worries - thanks for looking in to it.