-
Notifications
You must be signed in to change notification settings - Fork 27.4k
1.4 to 1.5 Regression - Flickering issue when using ng-show/ng-hide #13974
Comments
Thanks for the report. Can you the following for us:
|
Did you try ng-cloak The ngCloak directive is used to prevent the Angular html template from being briefly displayed by the browser in its raw (uncompiled) form while your application is loading. Use this directive to avoid the undesirable flicker effect caused by the html template display I think all angular apps (that doesn't use ng-include to load template) |
Just did it sorry. 1.4.4 is fine the bug occurs for the first time in 1.4.5. I tried to reconstruct it in plnkr.co without success i will try it tomorrow again. With ng-cloak it just flickers differently when i put it on different elements |
No, I actually just mean if they use directives that are animatable, such as ng-if, ng-class |
I isolated a part of the code: A parent contains a ng-class but even when i remove it, the problem still persists! I will try to make a plnkr during the day. |
ngShow and ngHide are also considered class based animations, so they will also add rAF spacing. |
Ok i found the issue ! :) Sorry it was my fault i didn't update the angular-animate to the latest version (it was 1.4.X). Maybe it fixes @havenchyk issue too |
Hi, I am experiencing a similar issue with angular 1.5.8 (having just upgraded from v 1.12.15). I just wondered if this may have re-appeared in the latest version (i am using the 1.5.8 version of angular-animate). The problem is very apparent under IE11, it is there under Chrome also but more often than not the transition is too fast to notice. The directive i have is a tab control that uses transclusion to include tab pages. The flicker i am experiencing (which briefly shows the new and old active tab page html side by side) is when the user switches between tabs (i.e. after compilation and template loading). The code uses ng-show with a boolean flag to decide whether or not to display the page (of which a maximum of 1 is active at any one time). I will attempt to create a plunkr to demonstrate but it may take a while. I could raise this as a separate issue if you prefer? |
Hi, just found issue #14015 which is open, i will add my finding there. Thanks |
Hi, |
Overview of the Issue -
Today i updated AngularJS 1.4 to AngularJS 1.5 and i noticed a flickering issue when loading the application with hidden ng-show/hide elements (see video)
Angular Version(s) - Regression from 1.4 to 1.5
Browsers and Operating System - Chrome 48.0.2564.97 (64-bit) MacOS 10.11.3 (15D21)
Reproduce the Error - See video
https://monosnap.com/file/d7ULotSANvDOqi7MEmIPYerZ1xH1O6
hints: I'm refreshing the pages multiple times switching between angularjs 1.4 and 1.5. Take a look at the element that appears under the search box when using 1.5 and the clear search element that appears right from the filter chapters... box although it should be hidden
When refreshing the page the ng-hide / ng-show elements are shortly visible on pageload in 1.5 (before angularjs doesn't compile the directives ?)
Suggestion: Quick fix is to use ng-if instead of ng-show/hide until the bug is fixed
The text was updated successfully, but these errors were encountered: