Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #143 from Shopify/modal-overflow-mobile
Browse files Browse the repository at this point in the history
Modal overflow mobile
  • Loading branch information
cshold committed Jul 11, 2014
2 parents 6c7ee8c + f25f2a6 commit b24c835
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions assets/ajaxify.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ var ajaxifyShopify = (function(module, $) {
};

showModal = function (toggle) {
$body.addClass('ajaxify-modal-visible');
// Build the cart if it isn't already there
if ( !cartInit && toggle ) {
Shopify.getCart(cartUpdateCallback);
Expand Down Expand Up @@ -490,6 +491,7 @@ var ajaxifyShopify = (function(module, $) {
};

hideModal = function (e) {
$body.removeClass('ajaxify-modal-visible');
if (e) {
e.preventDefault();
}
Expand Down
10 changes: 9 additions & 1 deletion assets/ajaxify.scss.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,14 @@ $modalBorderColor: $borderColor;
}

/*============================================================================
Ajaxify Loader
General Styles
==============================================================================*/
@include at-query ($max, $small) {
body.ajaxify-modal-visible {
overflow: hidden;
}
}

.ajaxifyCart-loader {
display: none;
opacity: 0;
Expand Down Expand Up @@ -492,6 +498,8 @@ form[action^="/cart/add"] {
height: auto;
z-index: 99999999;
visibility: hidden;
overflow: scroll;
-webkit-overflow-scrolling: touch;
@include transition('box-shadow 600ms cubic-bezier(0.47, 0.5, 0, 0.95) 400ms, margin-top 200ms ease-in-out');

// Short screens
Expand Down

0 comments on commit b24c835

Please sign in to comment.