Skip to content

Commit

Permalink
fix(modal, popover): do not dismiss when ionDismiss is emitted from s…
Browse files Browse the repository at this point in the history
…elect (#25125)

resolves #25124
  • Loading branch information
liamdebeasi authored Apr 15, 2022
1 parent 96b2003 commit 90115db
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
8 changes: 0 additions & 8 deletions core/src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -723,13 +723,6 @@ export class Modal implements ComponentInterface, OverlayInterface {
this.dismiss(undefined, BACKDROP);
};

private onDismiss = (ev: UIEvent) => {
ev.stopPropagation();
ev.preventDefault();

this.dismiss();
};

private onLifecycle = (modalEvent: CustomEvent) => {
const el = this.usersElement;
const name = LIFECYCLE_MAP[modalEvent.type];
Expand Down Expand Up @@ -770,7 +763,6 @@ export class Modal implements ComponentInterface, OverlayInterface {
}}
id={modalId}
onIonBackdropTap={this.onBackdropTap}
onIonDismiss={this.onDismiss}
onIonModalDidPresent={this.onLifecycle}
onIonModalWillPresent={this.onLifecycle}
onIonModalWillDismiss={this.onLifecycle}
Expand Down
8 changes: 0 additions & 8 deletions core/src/components/popover/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,6 @@ export class Popover implements ComponentInterface, PopoverInterface {
return eventMethod(this.el, 'ionPopoverWillDismiss');
}

private onDismiss = (ev: UIEvent) => {
ev.stopPropagation();
ev.preventDefault();

this.dismiss();
};

private onBackdropTap = () => {
this.dismiss(undefined, BACKDROP);
};
Expand Down Expand Up @@ -613,7 +606,6 @@ export class Popover implements ComponentInterface, PopoverInterface {
onIonPopoverWillPresent={onLifecycle}
onIonPopoverWillDismiss={onLifecycle}
onIonPopoverDidDismiss={onLifecycle}
onIonDismiss={this.onDismiss}
onIonBackdropTap={this.onBackdropTap}
>
{!parentPopover && <ion-backdrop tappable={this.backdropDismiss} visible={this.showBackdrop} part="backdrop" />}
Expand Down

0 comments on commit 90115db

Please sign in to comment.