From 0e98fb40fdbe9e66b837824d0f81d26e9016569f Mon Sep 17 00:00:00 2001 From: milan Date: Thu, 14 Nov 2024 15:28:54 +0100 Subject: [PATCH] tab size fix Regarding Ticket #100501 --- api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts b/api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts index a780731ce8..8d3d8cef17 100644 --- a/api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts +++ b/api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts @@ -269,9 +269,11 @@ export class Et2Tabs extends Et2InputWidget(SlTabGroup) implements et2_IResizeab const initial = firstTab.hasAttribute("active"); firstTab.setAttribute("active", ''); const tabHeight = getComputedStyle(firstTab).height; - if (parseInt(maxHeight) > 50 && parseInt(maxHeight) < parseInt(tabHeight)) + if (parseInt(maxHeight) > 50 && parseInt(maxHeight) < parseInt(tabHeight)) //there was a reasonable max height set { this.tabHeight = maxHeight; + } else if(maxHeight != '0px'){ //max height was set but is unreasonable small + this.tabHeight = '86vh' // use most of available space, but not all so Tabbox header fits too, and does not need second scrollbar } else { this.tabHeight = tabHeight;