Skip to content

bug: DatetimeButton with modal results in nested ion-page elements #26117

@loopezz

Description

@loopezz

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

Using the ion-datetime-button in combination with inline ion-modal creates infinite nested ion-page elements after opening and closing it multiple times.

Expected Behavior

The ion-page element must not be rendered or only rendered once.

Steps to Reproduce

  1. https://ionicframework.com/docs/api/datetime-button#basic-usage
  2. Open the browser's inspector
  3. Inspect 'ion-modal' in the StackBlitz example
  4. Verify there is no ion-page element rendered
  5. Toggle the datetime selector multiple times
  6. Inspect 'ion-modal' in the StackBlitz example again

Before:
Screenshot 2022-10-13 at 10 55 09

After:
Screenshot 2022-10-13 at 10 55 47

Code Reproduction URL

No response

Ionic Info

Example code from the Ionic docs

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