-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: canLeave event for overlays #22297
Comments
@EinfachHans Good idea, but isn't it possible to something like that with |
@BerkeAras it doesn't change the animation and i think i'm not able to "cancel" the dismissing here |
@EinfachHans event.preventDefault does not work? |
You don't have a event here and even if you have this won't be async and more a workaround then a solution @BerkeAras |
Ok I see. Slower drag if dismiss not allowed. And |
Merged #22626 into this issue. I think this is an interesting feature and can see this being useful for modals in general, not just card-style modals. |
@liamdebeasi My PR is for normal Modals as well 😃 |
resolves #22297 Co-authored-by: EinfachHans <EinfachHans@users.noreply.github.com>
Thanks for the issue. This has been resolved via #24928, and this feature will be available in an upcoming release of Ionic Framework. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Feature Request
Ionic version:
[x] 5.x
Describe the Feature Request
I want to add a CanLeave() Event on Overlays (mainly iOS card Style modal, but also for upcoming drawer) which should be somehow triggered while swiping. See attached Video of how native Web.de Mail-App handles this:
If nothing was typed in, i can just swipe to close the modal. If i did, the swipe doesn't go to the end and shows a Action Sheet after i released.
Describe Preferred Solution
I think this should automatically work if a CanDismiss Callback is set to the Modal Element. This should be able to parse a boolean, or better a Promise or even better both.
The text was updated successfully, but these errors were encountered: