Skip to content

Commit

Permalink
fix(ModelessOverlay): Fix for animation on open in Firefox browser (p…
Browse files Browse the repository at this point in the history
…atternfly#776)

Use a 150ms delay to update show & in classes for both open and close

fixes patternfly#774
  • Loading branch information
jeff-phillips-18 authored and priley86 committed Oct 17, 2018
1 parent f47af0b commit 469ab3a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ModelessOverlay extends React.Component {
constructor(props) {
super(props);
this.state = { isIn: false };
this.inTimer = new Timer(null, 150);
this.inTimer = new Timer(this.updateForTransitions, 150);
}

componentWillUnmount() {
Expand All @@ -30,7 +30,8 @@ class ModelessOverlay extends React.Component {
);

if (isIn !== show) {
this.inTimer.startTimer(() => this.updateForTransitions(), show ? 0 : 150);
this.inTimer.clearTimer();
this.inTimer.startTimer();
}

const dialogClasses = classNames('modal-dialog', {
Expand Down

0 comments on commit 469ab3a

Please sign in to comment.