Skip to content

bug: Inline Modals not working #23561

Description

@EinfachHans

Bug Report

Ionic version:

[ ] 4.x
[ ] 5.x
[X] 6.x

Current behavior:

I'm currently trying to open a inlined Modal with a Datetime Component in it. As this also doesn't work with any other stuff inside i guess it's a Modal Issue.

My Code:

<ion-modaltrigger="open-modal"><ion-datetime></ion-datetime></ion-modal>
  1. My IDEA (IntelliJ) says Attribute trigger is not allowed here, but i don't know if this is something that you can fix.
  2. If i press the button with the matching id a modal opens but it's just a white screen.

Even if i design my Modal like:

<ion-modal><ion-header><ion-toolbar><ion-title>Test</ion-title></ion-toolbar></ion-header><ion-content></ion-content></ion-modal>

it's just a white modal.

Additional Question:

  • Is it possible to somehow use presentingElement & swipeToClose in an inlined Modal?
  • What i want to create is a effect that you have an image at the bottom of your screen and if you pull and swipe this image up it transforms into a "normal" modal. For that i think to adjust the present & dismiss animation of the inlined modal as weill

Expected behavior:

To correctly opens the Modal.

Steps to reproduce:

I created a small Repo: https://github.com/EinfachHans/ionic-inline-modal-bug

Ionic info:

Ionic:
Ionic CLI : 6.16.3 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.0-beta.0
@angular-devkit/build-angular : 12.0.5
@angular-devkit/schematics : 12.0.5
@angular/cli : 12.0.5
@ionic/angular-toolkit : 4.0.0
Capacitor:
Capacitor CLI : 3.0.2
@capacitor/android : not installed
@capacitor/core : 3.0.2
@capacitor/ios : not installed
Utility:
cordova-res (update available: 0.15.3) : 0.15.1
native-run : 1.4.0
System:
NodeJS : v14.15.4 (/usr/local/bin/node)
npm : 7.17.0
OS : macOS Big Sur

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions