From 9fb4c0ab9a9943adf6492ac9adec101d03966321 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 14 Aug 2024 09:24:05 -0600 Subject: [PATCH] Fix nextmatch in tabs did not correctly find tab, breaking loading & sizing --- api/js/etemplate/et2_core_DOMWidget.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_core_DOMWidget.ts b/api/js/etemplate/et2_core_DOMWidget.ts index 1876909df1..df8eb6a6cf 100644 --- a/api/js/etemplate/et2_core_DOMWidget.ts +++ b/api/js/etemplate/et2_core_DOMWidget.ts @@ -349,7 +349,7 @@ export abstract class et2_DOMWidget extends et2_widget implements et2_IDOMNode { // Find the tab by DOM heritage // @ts-ignore - if(tabbox.tabData[i].contentDiv?.contains(this.div[0] || this)) + if(tabbox.tabData[i].contentDiv?.contains(this.getDOMNode() || this)) { return tabbox.tabData[i]; } @@ -363,7 +363,9 @@ export abstract class et2_DOMWidget extends et2_widget implements et2_IDOMNode } while (template !== tabbox && template.getType() !== 'template'); for (var i = tabbox.tabData.length - 1; i >= 0; i--) { - if (template && template.id && template.id === tabbox.tabData[i].id) + if(template && template.id && + (template.id === tabbox.tabData[i].id || tabbox.tabData[i].contentDiv?.getWidgetById(template.id) !== null) + ) { return tabbox.tabData[i]; }