From d0f37ac53c77fa50632b6062355470cff64876a0 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 9 Feb 2015 11:49:33 +0000 Subject: [PATCH] Fix resize method for templates with height bigger than screen.availHeight --- etemplate/js/etemplate2.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index d5d9c0aec8..d54c5e9991 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -147,6 +147,10 @@ etemplate2.prototype.resize = function(e) // Recalculate excess height if the appheader is shown if (appHeader.length > 0 && appHeader.is(':visible')) excess_height -= appHeader.outerHeight()-9; + // Do not resize if the template height is bigger than screen available height + // For templates which have sub templates and they are bigger than screenHeight + if(screen.availHeight < $j('.et2_container').height()) excess_height = 0; + // Call the "resize" event of all functions which implement the // "IResizeable" interface self.widgetContainer.iterateOver(function(_widget) {