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
page transition animation starts before ionViewWillLeave when using swipe to go back #17600
Comments
Hi there, Thanks for opening an issue with us! Would you be able to provide a repository with the code required to reproduce this issue? Thanks! |
I just made an example based on the ionic 4 blank template. The repository is: https://github.com/martijnlutgens/ionic4-swipe-ionviewwillleave. |
I kindly vote for this bug to be prioritized higher. We had to disable the swipe-to-go-back gesture in our iOS app since this bug breaks the app when you hit it. The app feels significantly less like an iOS app when you can't swipe to go back :-( |
I agree that it is a major issue since STGB is the most common UX pattern on iOS. As a workaround I just disable STGB when needed for now like: |
Thanks for the idea. I don't think it's a good solution in general, as it's almost more jarring to have STGB not work in a few seemingly random places than having it disabled for the whole app. |
This is a major issue. I too vote to up the priority on this one. :) |
I also agree that it is a major issue. This is kinda important for an IOS App. |
I agree. This should be prioritized higher. It does not feel like a native iOS App with STGB disabled. |
This issue create more problems such as the one on #20092 |
Are there any news on this? This still happens in Ionic v5 🙁 |
Still happens in latest |
Up |
Yes, still happens. As for me, if it helps anyone, what I did on iOS if I wanted to NOT be able to swipe back is: Page 1: You'll have to import the Router and routerOutlet. This is just a workaroud because you'll have to do it on every page you want to disable the swipeBack, but it works. |
It still happens to me in version 6.0. The documentation on the website says:
But doing cleanup in this function will break any view when an user starts a swipe action and then cancels it. |
i have exactly this problem. @liamdebeasi what is the supposed way to deal with this? and specifically - since you merged #19894 into this issue - is there a way to detect a swipe-cancel to recover from a cleanup in |
Is anyone else here able to replicate the actual UX of the page moving off to the right when using STGB? My transition is still fading from the top down when using STGB and it looks funky. I found an issue for ionic:react where they solved the transition, but not for angular. |
Bug Report
Ionic version:
[x] 4.0.1
Current behavior:
In 4.0.1. ionViewWillLeave does trigger, but is too late when using swipe to go back. In Ionic 3 ionViewWillLeave will trigger before the page transition animation. Now in Ionic 4 it is triggered after the page transition is started. So the user can drag away the current page and then it will stay that way (leaving translateX at 100%). I am using this in conjunction with a CanDeactivateGuard to prevent a user from leaving a page that is being edited.
Expected behavior:
When you block the possibility to leave a page on ionViewWillLeave (with a CanDeactivateGuard) and a user swipes to go back, the page transition should not have started, because then the user is still able to swipe away the page.
Steps to reproduce:
Create a component that uses CanDeactivateGuard like in the related code. When canLeave is false and you swipe to go back you are still able swipe the page away while the alert is open.
Related code:
Other information:
Ionic info:
The text was updated successfully, but these errors were encountered: