MOBILE-4270 collapsible-header: Fix changes not detected

Before this change, listenEvents was called after initializeFloatingTitle, so the mutationObserver didn't exist when initializeFloatingTitle was executed.
main
Dani Palou 2023-05-03 12:50:32 +02:00
parent 4820ff18a3
commit cf595146a8
1 changed files with 2 additions and 2 deletions

View File

@ -125,6 +125,8 @@ export class CoreCollapsibleHeaderDirective implements OnInit, OnChanges, OnDest
await this.enteredPromise, await this.enteredPromise,
]); ]);
this.listenEvents();
await this.initializeFloatingTitle(); await this.initializeFloatingTitle();
this.initializeContent(); this.initializeContent();
} }
@ -291,8 +293,6 @@ export class CoreCollapsibleHeaderDirective implements OnInit, OnChanges, OnDest
return; return;
} }
this.listenEvents();
// Initialize from tabs. // Initialize from tabs.
const tabs = CoreDirectivesRegistry.resolve(this.page.querySelector('core-tabs-outlet'), CoreTabsOutletComponent); const tabs = CoreDirectivesRegistry.resolve(this.page.querySelector('core-tabs-outlet'), CoreTabsOutletComponent);