Avoid triggering initial resize if not necessary

This commit is contained in:
Hadi Nategh 2021-06-24 16:17:25 +02:00
parent c8d2f535d9
commit e5d0e5def0

View File

@ -335,6 +335,7 @@ window.app = {classes: {}};
// Don't let the window gets horizental scrollbar
var scrollWidth = document.body.scrollWidth - document.body.clientWidth;
var scrollHeight = document.body.scrollHeight - w.height;
if (scrollWidth > 0 && scrollWidth + egw_getWindowOuterWidth() < screen.availWidth) delta_width = -scrollWidth;
if (delta_height && egw_getWindowOuterHeight() >= egw.availHeight())
@ -342,7 +343,7 @@ window.app = {classes: {}};
delta_height = 0;
}
if((delta_width != 0 || delta_height != 0) &&
(delta_width >2 || delta_height >2 || delta_width<-2 || delta_height < -2))
(delta_width >2 || delta_height >2 || delta_width<-2 || delta_height < -2) && (scrollHeight>0 || scrollWidth>0))
{
if (window.framework && typeof window.framework.resize_popup != 'undefined')