Etemplate: Fix printing ruined scrolling in nextmatch

This commit is contained in:
nathangray 2020-10-15 10:11:24 -06:00
parent ff91be903a
commit 758934c1e4
2 changed files with 7 additions and 1 deletions

View File

@ -2196,6 +2196,9 @@ var et2_nextmatch = /** @class */ (function (_super) {
* in beforePrint() * in beforePrint()
*/ */
et2_nextmatch.prototype.afterPrint = function () { et2_nextmatch.prototype.afterPrint = function () {
if (!this.div.hasClass('print')) {
return;
}
this.div.removeClass('print landscape portrait'); this.div.removeClass('print landscape portrait');
jQuery(this.print.orientation_style).remove(); jQuery(this.print.orientation_style).remove();
delete this.print.orientation_style; delete this.print.orientation_style;

View File

@ -2920,7 +2920,10 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
*/ */
afterPrint( ) afterPrint( )
{ {
if(!this.div.hasClass('print'))
{
return;
}
this.div.removeClass('print landscape portrait'); this.div.removeClass('print landscape portrait');
jQuery(this.print.orientation_style).remove(); jQuery(this.print.orientation_style).remove();
delete this.print.orientation_style; delete this.print.orientation_style;