Skip to content

Commit

Permalink
StickyHeaders: Update on table resize for Firefox. Fixes #1183
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Mar 23, 2016
1 parent fade388 commit 8ed9156
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/js/widgets/widget-stickyHeaders.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion js/widgets/widget-stickyHeaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,21 @@
}
}

// resize table (Firefox)
if (wo.stickyHeaders_addResizeEvent) {
$table.bind('resize' + c.namespace + 'stickyheaders', function() {
resizeHeader();
});
}

$table.triggerHandler('stickyHeadersInit');

},
remove: function(table, c, wo) {
var namespace = c.namespace + 'stickyheaders ';
c.$table
.removeClass('hasStickyHeaders')
.unbind( ('pagerComplete filterEnd stickyHeadersUpdate '.split(' ').join(namespace)).replace(/\s+/g, ' ') )
.unbind( ('pagerComplete resize filterEnd stickyHeadersUpdate '.split(' ').join(namespace)).replace(/\s+/g, ' ') )
.next('.' + ts.css.stickyWrap).remove();
if (wo.$sticky && wo.$sticky.length) { wo.$sticky.remove(); } // remove cloned table
$(window)
Expand Down

0 comments on commit 8ed9156

Please sign in to comment.