Skip to content

Commit

Permalink
Revert "[KirbyPage] Fix rare title intersection observer bug (#2822)" (
Browse files Browse the repository at this point in the history
  • Loading branch information
kodeaben authored and SigurdVilstrup committed Mar 21, 2023
1 parent 9576718 commit d820c6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/designsystem/page/src/page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,13 @@ export class PageComponent
}

private initializeTitle() {
// Ensures initializeTitle() won't run, if already initialized
if (this.hasPageTitle) return;
this.hasPageTitle = this.title !== undefined || !!this.customTitleTemplate;
this.toolbarTitleVisible = !this.hasPageTitle;
this.hasPageSubtitle = this.subtitle !== undefined || !!this.customSubtitleTemplate;

if (this.hasPageTitle) {
this.pageTitleIntersectionObserverRef.disconnect();
setTimeout(() => {
this.pageTitleIntersectionObserverRef.observe(this.pageTitle.nativeElement);
});
Expand Down

0 comments on commit d820c6f

Please sign in to comment.