Skip to content

iOS - page freezes on page navigation with transition property #6838

Closed as not planned

Description

@erjdriver

Environment
Latest 5.1 - issue on iOS platform

Plugin nativescript-ui-sidedrawer

Describe the bug
Simple test app that has an icon on the bottom left. Press it and navigate to another page. Press back and press the icon again to repeat. Page is frozen.

This is on iOS.

I've narrowed the problem down to the navigation code (file main-view-model.ts).

If the transition property is commented out - it works.

If that property is activated, then on navigating back to the main page, the whole page is frozen - subsequent clicks never occur.

To Reproduce
Make sure the transition property in main-view-model.ts is enabled.

Press the icon to navigate to new page and then navigate back.

Try to press the icon again - page should be frozen.

Expected behavior
Should be able to navigate freely.

Sample project
test3.zip

Additional context
I think this might be related to issue #6810.

This app also has a nativescript-ui-sidedrawer.

Interestingly, if I set the flat property of the ActionBar is set to false - app works - but creates other issues (e.g. #6674)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

  1. tsonevn commented on Jan 28, 2019

    @tsonevn
    Contributor

    Hi @erjdriver,
    I have checked your project, however, I think that the case is different.
    I found that this issue happens when we show and hide the Activity indicator while setting up the isBusy property just before the navigation. It seems that the ViewModel does not complete setting up the value for the isBusy property correctly and breaks the further navigations. We will investigate further the issue and will verify if this is a real issue or it is something related to the project configuration.

    Meanwhile, you can set up a timeout of one millisecond before making the navigation, which seems to solve the problem.

    setTimeout(() => {
                        
                    frameModule.topmost().navigate( page_def );
                }, 1);
    
  2. erjdriver commented on Jan 28, 2019

    @erjdriver
    Author

    I just tested with the setTimeout() and the page freezes the second time around - as long as you have the isBusy=true before the setTimeout() and isBusy=false inside the setTimeout() - with the navigation transition enabled.

    Did you have the isBusy code enabled? and the transition?

    Another odd aspect of this issue is that if I set the flat property of ActionBar to false - the code works as is.

    Very strange - ActionBar, nativescript-ui-sidedrawer, ActivityIndicator and transition issue.

    Here's the code that freezes:

    Note that I changed the animation duration from 350 to 1 - but still freezes.

                this.isBusy = true; 
    
                setTimeout( () =>
                {
                this.isBusy = false;
                var page_def =
                {
                    moduleName: "about-page",
                    animated: true,
    
                    transition: {
                        name: "slide",
                        duration: 1,
                        curve: "easeInOut"
                    }
    
               };
         
                frameModule.topmost().navigate( page_def );
            }, 1 );
  3. tsonevn commented on Jan 29, 2019

    @tsonevn
    Contributor

    HI @erjdriver,
    I test the scenario with the flat set false, and it seems that this will make the navigation to work the first three times on my side. Then the navigation will still block. Can you try setting up only the navigate method in the timeout? For example:

    setTimeout(() => {
            frameModule.topmost().navigate( page_def );
         }, 1);
    
  4. erjdriver commented on Jan 29, 2019

    @erjdriver
    Author

    The following code does NOT work

                var page_def =
                {
                    moduleName: "about-page",
                    animated: true,
    
                    transition: {
                        name: "slide",
                        duration: 1,
                        curve: "easeInOut"
                    }
                };
    
                this.isBusy = true;
    
                setTimeout( () =>
                {
                    this.isBusy = false; 
    
                    frameModule.topmost().navigate( page_def );
                }, 1 );
               var page_def =
                {
                    moduleName: "about-page",
                    animated: true,
    
                    transition: {
                        name: "slide",
                        duration: 1,
                        curve: "easeInOut"
                    }
                };
    
                this.isBusy = true;
    
                this.isBusy = false;
    
                frameModule.topmost().navigate( page_def );

    The following snippets DO work.

                var page_def =
                {
                    moduleName: "about-page",
                    animated: true,
    
                    /*
                    transition: {
                        name: "slide",
                        duration: 1,
                        curve: "easeInOut"
                    }
                    */
                };
    
                this.isBusy = true;
    
                this.isBusy = false;
    
                frameModule.topmost().navigate( page_def );
                var page_def =
                {
                    moduleName: "about-page",
                    animated: true,
    
                    /*
                    transition: {
                        name: "slide",
                        duration: 1,
                        curve: "easeInOut"
                    }
                    */
                };
    
                //this.isBusy = true;
    
                setTimeout( () =>
                {
                    //this.isBusy = false;
    
                    frameModule.topmost().navigate( page_def );
                }, 1 );
                var page_def =
                {
                    moduleName: "about-page",
                    animated: true,
    
                    /*
                    transition: {
                        name: "slide",
                        duration: 1,
                        curve: "easeInOut"
                    }
                    */
                };
    
                this.isBusy = true;
    
                setTimeout( () =>
                {
                    this.isBusy = false;
    
                    frameModule.topmost().navigate( page_def );
                }, 1 );
               var page_def =
                {
                    moduleName: "about-page",
                    animated: true,
    
                    transition: {
                        name: "slide",
                        duration: 1,
                        curve: "easeInOut"
                    }
                };
    
                //this.isBusy = true;
    
                setTimeout( () =>
                {
                    //this.isBusy = false;
    
                    frameModule.topmost().navigate( page_def );
                }, 1 );

    But setting isBusy and resetting is something that I need - so for now - I've chosen not to set the transition - that combination works.

  5. MartoYankov commented on Feb 20, 2019

    @MartoYankov
    Contributor

    It seems the RadSideDrawer and flat ActionBar are a separate issue that cause the UI layout to break. This should be fixed with #6929.

    I was able to isolate this underlying issue to the custom slide animation and a visibility binding trigger on the Page. Here is a simple playground.

    https://play.nativescript.org/?template=play-tsc&id=hnisRP&v=2

  6. lambourn commented on Mar 20, 2019

    @lambourn

    I experience the same in {N} 5.2 with Angular project. Interestingly, this happens only when passing custom transition via NavigationOptions to the RouterExtensions.navigate(...) function.

    If I unset the custom transition (e.g. platform default is used) it works as expected.

  7. NathanWalker commented on Oct 23, 2026

    @NathanWalker
    Contributor

    Closing this old report: iOS navigation transitions and the side drawer plugin has changed substantially since NativeScript 5.2, and there's been no repro on a current version. If you still see this on current @nativescript/core, please open a new issue with a minimal repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions