mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
fix(modal, popover): remove trigger click listeners when overlay is unmounted (#26167)
This commit is contained in:
@ -332,7 +332,17 @@ export class Modal implements ComponentInterface, OverlayInterface {
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
prepareOverlay(this.el);
|
||||
const { configureTriggerInteraction, el } = this;
|
||||
prepareOverlay(el);
|
||||
configureTriggerInteraction();
|
||||
}
|
||||
|
||||
disconnectedCallback() {
|
||||
const { destroyTriggerInteraction } = this;
|
||||
|
||||
if (destroyTriggerInteraction) {
|
||||
destroyTriggerInteraction();
|
||||
}
|
||||
}
|
||||
|
||||
componentWillLoad() {
|
||||
@ -371,7 +381,6 @@ export class Modal implements ComponentInterface, OverlayInterface {
|
||||
raf(() => this.present());
|
||||
}
|
||||
this.breakpointsChanged(this.breakpoints);
|
||||
this.configureTriggerInteraction();
|
||||
}
|
||||
|
||||
private configureTriggerInteraction = () => {
|
||||
|
||||
Reference in New Issue
Block a user