Skip to content

Commit

Permalink
Fix vodkabears#131: Opera 12.1 bug with animations
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed May 24, 2015
1 parent 6cd095d commit 7c95b6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
7 changes: 1 addition & 6 deletions src/remodal.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ html.remodal-is-locked {
right: -5000px;
bottom: -5000px;
left: -5000px;
}

.remodal-overlay.remodal-is-closed {
display: none;
}

Expand All @@ -40,17 +38,14 @@ html.remodal-is-locked {
bottom: 0;
left: 0;

display: none;
overflow: auto;

text-align: center;

-webkit-overflow-scrolling: touch;
}

.remodal-wrapper.remodal-is-closed {
display: none;
}

.remodal-wrapper:after {
display: inline-block;

Expand Down
10 changes: 6 additions & 4 deletions src/remodal.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@
});

instance.$bg.removeClass(instance.settings.modifier);
instance.$overlay.removeClass(instance.settings.modifier);
instance.$overlay.removeClass(instance.settings.modifier).hide();
instance.$wrapper.hide();
unlockScreen();
setState(instance, STATES.CLOSED, true);
}
Expand Down Expand Up @@ -567,8 +568,8 @@
current = remodal;
lockScreen();
remodal.$bg.addClass(remodal.settings.modifier);
remodal.$overlay.addClass(remodal.settings.modifier);
remodal.$wrapper.scrollTop(0);
remodal.$overlay.addClass(remodal.settings.modifier).show();
remodal.$wrapper.show().scrollTop(0);

syncWithAnimation(
function() {
Expand Down Expand Up @@ -610,7 +611,8 @@

function() {
remodal.$bg.removeClass(remodal.settings.modifier);
remodal.$overlay.removeClass(remodal.settings.modifier);
remodal.$overlay.removeClass(remodal.settings.modifier).hide();
remodal.$wrapper.hide();
unlockScreen();

setState(remodal, STATES.CLOSED, false, reason);
Expand Down

0 comments on commit 7c95b6e

Please sign in to comment.