Skip to content

Commit

Permalink
Merge pull request #545 from JMolenkamp/master
Browse files Browse the repository at this point in the history
ScrollResize: remove resize helper iframe on table destruction
  • Loading branch information
AllanJard authored Sep 1, 2022
2 parents 6315d1a + b308a5b commit 9b7b8fe
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion features/scrollResize/dataTables.scrollResize.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ var ScrollResize = function ( dt )
that._size();
} );

var onDestroy = function () {
dt.off('.pageResize', onDestroy);
this.s.obj && this.s.obj.remove();
}.bind(this);
dt.on('destroy.pageResize', onDestroy);

this._attach();
this._size();
};
Expand Down Expand Up @@ -154,7 +160,9 @@ ScrollResize.prototype = {
obj
.appendTo( this.s.host )
.attr( 'data', 'about:blank' );
}

this.s.obj = obj;
}
};


Expand Down

0 comments on commit 9b7b8fe

Please sign in to comment.