mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 11:51:43 +02:00
Et2Tabs: Better handling of fallback tab sizing
Now considering tab may be bigger than parent
This commit is contained in:
parent
042c539438
commit
5314a091a0
@ -235,10 +235,11 @@ export class Et2Tabs extends Et2InputWidget(SlTabGroup) implements et2_IResizeab
|
|||||||
}
|
}
|
||||||
walk(firstTab);
|
walk(firstTab);
|
||||||
await Promise.all(wait);
|
await Promise.all(wait);
|
||||||
|
const maxHeight = getComputedStyle(this.shadowRoot.querySelector('.tab-group__body')).height;
|
||||||
const initial = firstTab.hasAttribute("active");
|
const initial = firstTab.hasAttribute("active");
|
||||||
firstTab.setAttribute("active", '');
|
firstTab.setAttribute("active", '');
|
||||||
this.tabHeight = getComputedStyle(firstTab).height;
|
const tabHeight = getComputedStyle(firstTab).height;
|
||||||
|
this.tabHeight = maxHeight != '0px' && parseInt(maxHeight) < parseInt(tabHeight) ? maxHeight : tabHeight;
|
||||||
if(!initial)
|
if(!initial)
|
||||||
{
|
{
|
||||||
firstTab.removeAttribute("active");
|
firstTab.removeAttribute("active");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user