ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: Ionic View transition flickering

Open svsool opened this issue 11 years ago • 48 comments

Type: bug

Platform: ios 8 webview

There are problem with view transition in latest version, leaving view takes half display and overlap enter view, here bug localization View animations in 1.0.0-beta.13, is ok, animations smooth http://plnkr.co/edit/jxnbgCABggbqTTOwGPIp?p=preview View animations in 1.0.1 flickering http://plnkr.co/edit/1LYhSNLo5fxzMg1uzVGY?p=preview, many stage and leaving views created in dom on transition with style translate3d(33%, 0, 0) and not removed (http://joxi.ru/gV2VRBdiBdDv2v.jpg) On my ipad mini, 1.0.0-beta.13 working much faster than 1.0.1

svsool avatar Jul 01 '15 14:07 svsool

Current ionic info reads as:

Cordova CLI: 5.2.0 Ionic Version: 1.1.0 Ionic CLI Version: 1.6.4 Ionic App Lib Version: 0.3.8 ios-deploy version: 1.5.0 ios-sim version: 3.1.1 OS: Mac OS X Yosemite Node Version: v0.12.6 Xcode version: Xcode 6.4 Build version 6E35b

nowcodingaway avatar Aug 25 '15 15:08 nowcodingaway

Please open a separate issue.

mhartington avatar Aug 25 '15 15:08 mhartington

In the Spirit of collaboration, this is how I ended up solving my issue:

Approach 1. Ionic’s Modal, which is super well documented. I found it to be a little overkill for what I needed.

Approach 2.

  1. In the View I added < div dynamic="html" >< /div >:
  2. In my controller:
$scope.html = ’’;

-- The actual function call:

    $scope.toggle = function() {
    $scope.html =   ’< div class="item item-icon-right" >’ +
                    ’    < input type="text" placeholder="Insert new item" ng-model="item.title" autofocus >’ +
                    ’    < div class="icon ion-ios-checkmark-outline balanced" ng-click="saveToChecklist(item)" >< /div >’ +
                    ’< /div >’;
    }

-- The ng-click does it thing:

    $scope.saveToChecklist = function (item){
        $scope.sportCheckList.push(item);
    // save factory call..
        $scope.html = ’’; // and remove from view!
    }
  1. Added to my directives:
    .directive( ’dynamic’, function ( $compile ) {
      return {
        restrict: ’A’,
        replace: true,
        link: function ( scope, ele, attrs ) {
          scope.$watch( attrs.dynamic, function( html ) {
            ele.html( html );
            $compile( ele.contents() )( scope );
          });
        }
      };
    })

The view does not render or hide a DIV, which caused the Jump between views. From an user experience, IMHO approach 2 is a little more transparent -- ng-blur was a little temperamental. I am sure there are more elegant ways, but my caffeine is running low plus, got to put some miles on da bike.

Hope this helps, but If anyone has a better solution, I am all ears!

carloslema avatar Aug 25 '15 20:08 carloslema

@carloslema what is this in reference to? Does this have anything to do with the transition flickers?

mhartington avatar Aug 25 '15 20:08 mhartington

yup. The reason it was flickering, originally I was hiding a div after an ng-repeat. Before the ng-view completely rendered it had to sort out the hidding, causing the stuttering on view.

I figure, if anyone is adding anything that is doing something to the view before it finally renders it, that might the issue.

carloslema avatar Aug 25 '15 20:08 carloslema

Greetings @svsool!

My sensors indicate a reply was requested, but as we have not received one yet, I am using my robot powers to close this issue. However, if you are still experiencing this issue, please feel free to reopen it by creating a new issue, and include any examples or necessary information.

Thank you for allowing me to assist you.

Ionitron avatar Sep 24 '15 08:09 Ionitron

Greetings @svsool!

My sensors indicate a reply was requested, but as we have not received one yet, I am using my robot powers to close this issue. However, if you are still experiencing this issue, please feel free to reopen it by creating a new issue, and include any examples or necessary information.

Thank you for allowing me to assist you.

Ionitron avatar Sep 24 '15 08:09 Ionitron

I am also having transition issue as well. I am using side menu and side menu will show up with previous screen on it where only menu should show. It also flickers and show other page for 1/2 a second before it take you to the page you want. These issues do not happen on browsers but only in ios 9.0 haven't tested on android device.

wiltwitt avatar Sep 25 '15 01:09 wiltwitt

Tested on android 4.4 and works fine. I made a mistake saying previous page shows up on side menu panel, I meant to say previous page take up half the screen and new screen on another half. This only seems to happen on ios

wiltwitt avatar Sep 25 '15 02:09 wiltwitt

Ok, angular-ios9-uiwebview.patch.js from Igor fixed this issue. Thanks guys https://gist.github.com/IgorMinar/863acd413e3925bf282c

wiltwitt avatar Sep 25 '15 14:09 wiltwitt

@wiltwitt did you test that uiwebview patch from Igor?

dmarg avatar Oct 19 '15 15:10 dmarg

+1 for angular-ios9-uiwebview.patch.js

Saved my life

pierrybos avatar Oct 29 '15 15:10 pierrybos

@mhartington All transition issue are resolved except. One black background is showing behind page transition. Please suggest any option to resolve black background issue.

kapil019 avatar Nov 04 '15 11:11 kapil019

+1 for igor's patch

danieljin avatar Nov 24 '15 06:11 danieljin

This should be included in 1.1.1, which was released about a week ago.

mhartington avatar Nov 24 '15 15:11 mhartington

when i use collection repeat below error is displayed in console

RangeError: Maximum call stack size exceeded at String.replace (native) at render (http://192.168.0.110:8100/lib/ionic/js/ionic.bundle.js:50925:12)

vaidyanathanas avatar Jan 07 '16 05:01 vaidyanathanas

@vaidyanathanas can you post a codepen with code for us help you? Really you believe this problem has relation with this issue?

pierrybos avatar Jan 18 '16 13:01 pierrybos

No Sir. it was my mistake to post here. for collection-repeat i have alternative ng-repeat. but main problem is ionichistory for more than 2 views not working properly in android mobile. this is critical issue. please help me in this. thank you.

vaidyanathanas avatar Jan 18 '16 13:01 vaidyanathanas

@vaidyanathanas So, please, open a new issue and do a codeshare or codepen with your problem to us can debug and help you

pierrybos avatar Jan 18 '16 13:01 pierrybos

Sir please check the below link: https://github.com/driftyco/ionic/issues/4997

vaidyanathanas avatar Jan 18 '16 14:01 vaidyanathanas