mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
fix(modal): life cycle events for controller modals (#24508)
Resolves #24460
This commit is contained in:
@ -494,19 +494,7 @@ export class Modal implements ComponentInterface, OverlayInterface {
|
|||||||
|
|
||||||
if (dismissed) {
|
if (dismissed) {
|
||||||
const { delegate } = this.getDelegate();
|
const { delegate } = this.getDelegate();
|
||||||
|
|
||||||
/**
|
|
||||||
* If the modal is presented through a controller, we don't need to detach
|
|
||||||
* since the el was already removed during the `dismiss` call above. Skipping
|
|
||||||
* this step also prevents an issue where rapdily dismissing right after
|
|
||||||
* presenting could cause `detachComponent` to be called after the present
|
|
||||||
* finished, blanking out the newly opened modal.
|
|
||||||
*
|
|
||||||
* TODO(FW-423) try and find a way to resolve the race condition directly
|
|
||||||
*/
|
|
||||||
if (this.inline) {
|
|
||||||
await detachComponent(delegate, this.usersElement);
|
await detachComponent(delegate, this.usersElement);
|
||||||
}
|
|
||||||
|
|
||||||
if (this.animation) {
|
if (this.animation) {
|
||||||
this.animation.destroy();
|
this.animation.destroy();
|
||||||
|
Reference in New Issue
Block a user