diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index fa0275ad..dc4dcb75 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -469,23 +469,29 @@ fixHeight(table, c); }) .bind('disable.pager', function(){ + e.stopPropagation(); showAllRows(table, c); }) .bind('enable.pager', function(){ + e.stopPropagation(); enablePager(table, c, true); }) .bind('destroy.pager', function(){ + e.stopPropagation(); destroyPager(table, c); }) .bind('update.pager', function(){ + e.stopPropagation(); hideRows(table, c); }) .bind('pageSize.pager', function(e,v){ + e.stopPropagation(); c.size = parseInt(v, 10) || 10; hideRows(table, c); updatePageDisplay(table, c); }) .bind('pageSet.pager', function(e,v){ + e.stopPropagation(); c.page = (parseInt(v, 10) || 1) - 1; moveToPage(table, c); updatePageDisplay(table, c); diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index a223564b..704efb28 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -724,12 +724,14 @@ $this .unbind('sortReset update updateRows updateCell addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave '.split(' ').join('.tablesorter ')) .bind("sortReset.tablesorter", function(){ + e.stopPropagation(); c.sortList = []; setHeadersCss(table); multisort(table); appendToTable(table); }) .bind("update.tablesorter updateRows.tablesorter", function(e, resort, callback) { + e.stopPropagation(); // remove rows/elements before update $this.find(c.selectorRemove).remove(); // update sorting @@ -741,6 +743,7 @@ checkResort($this, resort, callback); }) .bind("updateCell.tablesorter", function(e, cell, resort, callback) { + e.stopPropagation(); $this.find(c.selectorRemove).remove(); // get position from the dom var l, row, icell, @@ -761,6 +764,7 @@ } }) .bind("addRows.tablesorter", function(e, $row, resort, callback) { + e.stopPropagation(); var i, rows = $row.filter('tr').length, dat = [], l = $row[0].cells.length, tbdy = $this.find('tbody').index( $row.closest('tbody') ); @@ -785,6 +789,7 @@ checkResort($this, resort, callback); }) .bind("sorton.tablesorter", function(e, list, callback, init) { + e.stopPropagation(); $this.trigger("sortStart", this); // update header count index updateHeaderSortCount(table, list); @@ -798,22 +803,27 @@ } }) .bind("appendCache.tablesorter", function(e, callback, init) { + e.stopPropagation(); appendToTable(table, init); if (typeof callback === "function") { callback(table); } }) .bind("applyWidgetId.tablesorter", function(e, id) { + e.stopPropagation(); ts.getWidgetById(id).format(table, c, c.widgetOptions); }) .bind("applyWidgets.tablesorter", function(e, init) { + e.stopPropagation(); // apply widgets ts.applyWidget(table, init); }) .bind("refreshWidgets.tablesorter", function(e, all, dontapply){ + e.stopPropagation(); ts.refreshWidgets(table, all, dontapply); }) .bind("destroy.tablesorter", function(e, c, cb){ + e.stopPropagation(); ts.destroy(table, c, cb); }); diff --git a/js/jquery.tablesorter.widgets.js b/js/jquery.tablesorter.widgets.js index 68dd0812..ecf6d8d5 100644 --- a/js/jquery.tablesorter.widgets.js +++ b/js/jquery.tablesorter.widgets.js @@ -572,6 +572,7 @@ $.tablesorter.addWidget({ $t .bind('addRows updateCell update updateRows updateComplete appendCache filterReset search '.split(' ').join('.tsfilter '), function(e, filter){ if (!/(search|filterReset)/.test(e.type)){ + e.stopPropagation(); buildDefault(true); } if (e.type === 'filterReset') { @@ -1011,7 +1012,8 @@ $.tablesorter.addWidget({ if (c.debug){ $.tablesorter.benchmark('saveSort: Last sort loaded: "' + sortList + '"', time); } - $t.bind('saveSortReset', function(){ + $t.bind('saveSortReset', function(e){ + e.stopPropagation(); $.tablesorter.storage( table, 'tablesorter-savesort', '' ); }); }