mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
fix(header): large title transition works on older versions of iOS (#21339)
This commit is contained in:
@ -64,6 +64,13 @@ export class Header implements ComponentInterface {
|
||||
const pageEl = this.el.closest('ion-app,ion-page,.ion-page,page-inner');
|
||||
const contentEl = (pageEl) ? pageEl.querySelector('ion-content') : null;
|
||||
|
||||
// Cloned elements are always needed in iOS transition
|
||||
writeTask(() => {
|
||||
const title = cloneElement('ion-title') as HTMLIonTitleElement;
|
||||
title.size = 'large';
|
||||
cloneElement('ion-back-button');
|
||||
});
|
||||
|
||||
await this.setupCollapsibleHeader(contentEl, pageEl);
|
||||
}
|
||||
}
|
||||
@ -127,10 +134,6 @@ export class Header implements ComponentInterface {
|
||||
this.scrollEl!.addEventListener('scroll', this.contentScrollCallback);
|
||||
|
||||
writeTask(() => {
|
||||
const title = cloneElement('ion-title') as HTMLIonTitleElement;
|
||||
title.size = 'large';
|
||||
cloneElement('ion-back-button');
|
||||
|
||||
if (this.collapsibleMainHeader !== undefined) {
|
||||
this.collapsibleMainHeader.classList.add('header-collapse-main');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user