From 35b3190188f9e528af776f61f29d296bc4b71dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Tue, 4 Oct 2022 15:07:24 +0200 Subject: [PATCH] fix(Tinebase) FF >=105 on linux always opens windows in fullscreen --- tine20/Tinebase/js/ux/PopupWindow.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tine20/Tinebase/js/ux/PopupWindow.js b/tine20/Tinebase/js/ux/PopupWindow.js index 6417a07bdaf..2abe60ecd50 100644 --- a/tine20/Tinebase/js/ux/PopupWindow.js +++ b/tine20/Tinebase/js/ux/PopupWindow.js @@ -215,9 +215,18 @@ Ext.extend(Ext.ux.PopupWindow, Ext.Component, { this.screenX = _.isNumber(this.screenX) ? this.screenX : ((w / 2) - (width / 2)) + dualScreenLeft; this.screenY = _.isNumber(this.screenY) ? this.screenY : ((h / 2) - (height / 2)) + dualScreenTop; - return popup = window.open(url, windowName, + const popup = window.open(url, windowName, 'width=' + width + ',height=' + height + ',screenY=' + this.screenY + ',screenX=' + this.screenX + ',directories=no,toolbar=no,location=no,menubar=no,scrollbars=no,status=no,resizable=yes,dependent=no'); + + // NOTE: FF 105 on linux always opens new windows in fullscreen + // NOTE: in Chrome we don't have innerHeight that early + if (Ext.isGecko && Ext.isLinux) { + const heightOffset = popup.outerHeight - popup.innerHeight; + popup.resizeTo(width, heightOffset+height); + } + + return popup; }, getState : function() {