From 905f0862184d4c1766b9c82a4e8bb07da971ac1b Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 15 Oct 2020 10:11:24 -0600 Subject: [PATCH] Etemplate: Fix printing ruined scrolling in nextmatch --- api/js/etemplate/et2_extension_nextmatch.js | 3 +++ api/js/etemplate/et2_extension_nextmatch.ts | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index 85d9688446..55cd29a39a 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -2196,6 +2196,9 @@ var et2_nextmatch = /** @class */ (function (_super) { * in beforePrint() */ et2_nextmatch.prototype.afterPrint = function () { + if (!this.div.hasClass('print')) { + return; + } this.div.removeClass('print landscape portrait'); jQuery(this.print.orientation_style).remove(); delete this.print.orientation_style; diff --git a/api/js/etemplate/et2_extension_nextmatch.ts b/api/js/etemplate/et2_extension_nextmatch.ts index 1aa11245f1..2c81d3e777 100644 --- a/api/js/etemplate/et2_extension_nextmatch.ts +++ b/api/js/etemplate/et2_extension_nextmatch.ts @@ -2920,7 +2920,10 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 */ afterPrint( ) { - + if(!this.div.hasClass('print')) + { + return; + } this.div.removeClass('print landscape portrait'); jQuery(this.print.orientation_style).remove(); delete this.print.orientation_style;