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

Commit

Permalink
fix(collapse): set overflow to hidden on transition
Browse files Browse the repository at this point in the history
- When collapse is transitioning, set `overflow: hidden` to avoid possibility of scrollbars changing size

Closes #6180
Fixes #5474
  • Loading branch information
wesleycho committed Aug 19, 2016
1 parent 2ade054 commit 84cc2cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/collapse/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,16 @@ angular.module('ui.bootstrap.collapse', [])
$animateCss(element, {
addClass: 'in',
easing: 'ease',
css: {
overflow: 'hidden'
},
to: getScrollFromElement(element[0])
}).start()['finally'](expandDone);
} else {
$animate.addClass(element, 'in', {
css: {
overflow: 'hidden'
},
to: getScrollFromElement(element[0])
}).then(expandDone);
}
Expand Down

1 comment on commit 84cc2cf

@mekhtiari
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not find these css option in AngularJS documentation for $animate.addClass and $animateCss. I think that it is why this commit does not solve the issue #5474.
I also added other CSS properties to see whether these options work or not, and It did not work!

Please sign in to comment.