Skip to content

bug: Crash with presenting element on IonModal #30573

@Ericlm

Description

@Ericlm

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

When creating an IonModal which have an IonPage as its presentingElement, the page crashes with the error :

Image

While the components hierarchy is following this behavior :

Image

Expected Behavior

The components should not crash as they are in the expected hierarchical order.

Steps to Reproduce

  1. Create an Ionic app
  2. Inside of an IonPage, add an IonModal
  3. Set a ref on the IonPage, and put the page as the presenting element of the modal : :presenting-element="page?.$el"
  4. When resizing the page, the crash occurs.

Code Reproduction URL

https://github.com/Ericlm/ion-modale-presenting

Ionic Info

Ionic:

Ionic CLI : 7.2.1 (/Users/ericlemaitre/.asdf/installs/nodejs/24.3.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 8.6.5

Capacitor:

Capacitor CLI : 7.4.2
@capacitor/android : not installed
@capacitor/core : 7.4.2
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v24.3.0 (/Users/ericlemaitre/.asdf/installs/nodejs/24.3.0/bin/node)
npm : 11.4.2
OS : macOS Unknown

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions