mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(overlay): overlay is not hidden
This commit is contained in:
@ -232,10 +232,8 @@ export class Datetime {
|
|||||||
const pickerOptions = this.generatePickerOptions();
|
const pickerOptions = this.generatePickerOptions();
|
||||||
this.picker = await this.pickerCtrl.create(pickerOptions);
|
this.picker = await this.pickerCtrl.create(pickerOptions);
|
||||||
await this.validate();
|
await this.validate();
|
||||||
if (this.picker) {
|
|
||||||
await this.picker.present();
|
await this.picker.present();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private emitStyle() {
|
private emitStyle() {
|
||||||
this.ionStyle.emit({
|
this.ionStyle.emit({
|
||||||
|
@ -9,7 +9,7 @@ export function createOverlay<T extends HTMLIonOverlayElement>(element: T, opts:
|
|||||||
// convert the passed in overlay options into props
|
// convert the passed in overlay options into props
|
||||||
// that get passed down into the new overlay
|
// that get passed down into the new overlay
|
||||||
Object.assign(element, opts);
|
Object.assign(element, opts);
|
||||||
element.classList.add('ion-page-hidden');
|
element.classList.add('ion-page-invisible');
|
||||||
const overlayIndex = lastId++;
|
const overlayIndex = lastId++;
|
||||||
element.overlayIndex = overlayIndex;
|
element.overlayIndex = overlayIndex;
|
||||||
if (!element.hasAttribute('id')) {
|
if (!element.hasAttribute('id')) {
|
||||||
@ -137,7 +137,7 @@ async function overlayAnimation(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make overlay visible in case it's hidden
|
// Make overlay visible in case it's hidden
|
||||||
baseEl.classList.remove('ion-page-hidden');
|
baseEl.classList.remove('ion-page-invisible');
|
||||||
|
|
||||||
const aniRoot = baseEl.shadowRoot || overlay.el;
|
const aniRoot = baseEl.shadowRoot || overlay.el;
|
||||||
const animation = overlay.animation = await overlay.animationCtrl.create(animationBuilder, aniRoot, opts);
|
const animation = overlay.animation = await overlay.animationCtrl.create(animationBuilder, aniRoot, opts);
|
||||||
|
Reference in New Issue
Block a user