mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01: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);
|
||||
await Promise.all(wait);
|
||||
|
||||
const maxHeight = getComputedStyle(this.shadowRoot.querySelector('.tab-group__body')).height;
|
||||
const initial = firstTab.hasAttribute("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)
|
||||
{
|
||||
firstTab.removeAttribute("active");
|
||||
|
Loading…
Reference in New Issue
Block a user