Closed schontz closed 4 years ago
Thanks for the issue. With Ionic 5 we removed controller components (I.e. ion-action-sheet-controller
), and Capacitor needs an update to account for that.
Yikes. That's a bad breaking change. Did I miss that in the release notes?
Any ETA for the fix?
Controller components only really affected vanilla JS apps (and apparently this) and have been deprecated for a while now. There are notes in the breaking changes document here: https://github.com/ionic-team/ionic/blob/master/BREAKING.md#controllers.
We do not comment on timelines for fixes, but we hope to have this resolved soon.
Moved to pwa-elements since the problem is there.
pwa-elements used ionic internally in the past, but was removed back in May, so a new action sheet component should be created for Capacitor to use.
It wasn't a problem on Ionic 4 apps because they had the Ionic component, but has been broken for vanilla JS apps or apps using other frameworks.
@jcesarmobile A quick search inside ionic-team/capacitor shows 2 usages of componentOnReady() on the web-component ion-action-sheet-controller, which is not part of current version of @ionic/core: https://github.com/ionic-team/capacitor/search?q=componentOnReady%28%29&unscoped_q=componentOnReady%28%29&type=Code
capacitor doesn't use ionic/core, so not sure what you mean. Did you read my message? capacitor uses pwa-elements for Toast, Camera and this Modal, but pwa-elements used ionic/core in the past, then it was removed and used custom components, but forgot to create one for the action sheet. So, yeah, it has to be fixed in Capacitor too, but first, pwa-elements needs an action sheet component.
Sorry @jcesarmobile, I misunderstood your comment first. So in other words the Modals plugin worked for us before ionic v. 5 only because we fortuitously use @ionic/core on ourselves inside our project and for all other projects it was broken since May?
yeah, it was working for Ionic 4 users only because the component was part of Ionic 4, has been broken for everybody else since May.
Bug Report
Ionic version:
[x] 5.x
Current behavior:
Displaying a capacitor modal worked fine in Ionic 4. As of Ionic 5 the following code crashes:
Error:
Expected behavior:
When viewing on the web, a "native like" UI should be shown to allow the user to pick a button.
Steps to reproduce:
Ionic info: