Skip to content
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

ionViewCanLeave() breaks navigation on second call, causes blank screen #8408

Closed
sjdrew opened this issue Oct 2, 2016 · 1 comment · Fixed by #8410
Closed

ionViewCanLeave() breaks navigation on second call, causes blank screen #8408

sjdrew opened this issue Oct 2, 2016 · 1 comment · Fixed by #8410
Assignees
Milestone

Comments

@sjdrew
Copy link

sjdrew commented Oct 2, 2016

ionic 2.0.0-RC0

The new ionViewCanLeave() breaks navigation. If user tries to go back once, it is blocked fine, however if on the second try of the back button also returns false, then when eventually returns true the navigation is broken and a blank white page displays.

Easy to produce, just create tutorial app via

ionic start MyIonic2Project tutorial --v2

Then add this code to the item-details.ts file, ItemDetailsPage class:

    public trys = 0;
    ionViewCanLeave(): any {
        if (this.trys++ < 2) {
            return false;
        } else return true;
    }

Then serve the app and click to item list page, then click on a row to view item-detail page, then click back button 3 times. You will end up with blank white page.

@manucorporat
Copy link
Contributor

@sjdrew WIP fix: #8410

manucorporat added a commit to manucorporat/ionic that referenced this issue Oct 3, 2016
manucorporat added a commit to manucorporat/ionic that referenced this issue Oct 3, 2016
manucorporat added a commit to manucorporat/ionic that referenced this issue Oct 4, 2016
manucorporat added a commit to manucorporat/ionic that referenced this issue Oct 6, 2016
manucorporat added a commit to manucorporat/ionic that referenced this issue Oct 8, 2016
manucorporat added a commit to manucorporat/ionic that referenced this issue Oct 10, 2016
manucorporat added a commit to manucorporat/ionic that referenced this issue Oct 10, 2016
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants