Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Hidden animated panels are visible on page load #12825

Open

Description

@Morhpeuss

Hi,

I have hidden floating panel.
HTML:
<div class="modal animated left-modal " data-ng-hide="!showFormCreator" ng-cloak data-ng-controller="formCreatorController" data-ng-include="'/app/views/form-creator.html'"></div>

CSS:

.left-modal.ng-hide-add {      
     -webkit-animation:  fadeOutRight  0.5s ;   
    -moz-animation:   fadeOutRight 0.5s;
    -ms-animation:   fadeOutRight 0.5s;    
    animation:   fadeOutRight 0.5s;     
}

.left-modal.ng-hide-remove{
    -webkit-animation:  fadeInRight  .5s ;   
    -moz-animation:   fadeInRight .5s;
    -ms-animation:   fadeInRight .5s;    
    animation:   fadeInRight .5s;   
}

In angular 1.3.13 works all fine.

After update to 1.4.4 and now to 1.4.5 all hidden animated panels are visible on page load for few seconds.

After page load is all fine.

Thanks for help.

Josef

Activity

  1. changed the title [-]Hidden animated panels visible on page load[/-] [+]Hidden animated panels are visible on page load[/+] on Sep 11, 2015
  2. Narretz commented on Sep 11, 2015

    @Narretz
    Contributor

    Can you please post a demo via plnkr.co or similar that shows the problem?

  3. added this to the Purgatory milestone on Sep 11, 2015
  4. Morhpeuss commented on Sep 25, 2015

    @Morhpeuss
    Author

    Demo: http://plnkr.co/edit/xWkbSWkKu2fMfUhRdvsk . When the application starts, you will see the hidden animated panel.

  5. modified the milestones: 1.4.9, Purgatory on Nov 26, 2015
  6. gkalpak commented on Dec 7, 2015

    @gkalpak
    Member

    A little more info:

    This seems to have been introduced in 1.4.0-rc.0 (aka the big $animate refactoring).
    I suspect it is the last breaking change from here, namely, the addClass animation is cancelled while an enter animation is in progress.

    What I haven't figured out yet, is what causes the enter animation (but it is happening as you can see here).

  7. gkalpak commented on Dec 7, 2015

    @gkalpak
    Member

    Aha...it's the ngInclude, of course.

    So, I am tempted to say that this works as expected (in the sense that it's a documented breaking change).
    Still have to figure out the most appropriate work-around (suggestions welcome).

  8. gkalpak commented on Dec 7, 2015

    @gkalpak
    Member

    As is usually the case, moving the directive on a child element solves the issue. E.g.:

    <!-- Change this: -->
    <div ... ng-show="..." ng-include="...">Pane</div>
    
    <!-- To that: -->
    <div ... ng-show="..."><div ng-include="...">Pane></div></div>

    Here is an updated plnkr.


    So, like I said, I am inclined to calling this a works as expected.
    WDYT, @Narretz, @matsko ?

  9. 26 remaining items

  10. removed this from the 1.4.10 milestone on Jan 28, 2016
  11. modified the milestones: 1.5.1, 1.5.x on Feb 15, 2016
  12. NeoGenet1c commented on May 10, 2016

    @NeoGenet1c

    Quick (& dirty) workaround is to add ng-hide class to the element.

  13. modified the milestones: 1.5.x, 1.6.x on Mar 31, 2017
  14. modified the milestones: 1.6.x, 1.7.x on Apr 12, 2018
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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions