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.

$animate#enter logic does not totally make sense #6276

Closed
@caitp

Description

@caitp
      enter: function(element, parent, after, done) {
        if (after) {
          after.after(element);
        } else {
          if (!parent || !parent[0]) {
            /* caitp note: `after` is falsy here, what are we doing? */
            parent = after.parent();
          }
          /* caitp note: I feel like if `after` is null, the expected behaviour would be
             to prepend. I'm sure there's a precedent for this somewhere, but I
             can't seem to find it on MDN. But someone on IRC was asking about
             how to make $animate#enter() prepend rather than append. */
          parent.append(element);
        }
        done && $timeout(done, 0, false);
      },

note I did sort of post this before doing a proper investigation to see how broken this is, but I'll do a quick test and close this if I think the behaviour is acceptable.

Oh, the IRC user posted an issue re: this too, #6274. Anyways, taking a quick look

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions