Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

fix(collapse): Flag initial animation complete when collapsing #1272

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/collapse/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ angular.module('ui.bootstrap.collapse', ['ui.bootstrap.transition'])

function collapse() {
if (initialAnimSkip) {
initialAnimSkip = false;
element.removeClass('collapsing');
element.addClass('collapse');
element.css({height: 0});
Expand Down Expand Up @@ -71,4 +72,4 @@ angular.module('ui.bootstrap.collapse', ['ui.bootstrap.transition'])
//TODO:
//- refactor to remove code duplication
//- corner cases - what happens in animation is in progress?
//- tests based on the DOM state / classes
//- tests based on the DOM state / classes