Skip to content

Commit

Permalink
Merge pull request #85 from wpmudev/fix/HUS-1337
Browse files Browse the repository at this point in the history
🐛 fix(slide in): close button not working in safari mobile view.
  • Loading branch information
rtbfreitas authored Jun 9, 2023
2 parents ff9c0d6 + cf9e741 commit 779e02a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library/js/slidein-layouts.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
const slidein = $( el );
const wrapper = slidein.find( '.hustle-slidein-content' );
const content = slidein.find( '.hustle-slidein-content > div' );
const maincontent = slidein.find( '.hustle-main-wrapper' );

let header = slidein.find( '.hustle-layout-header' );
let footer = slidein.find( '.hustle-layout-footer' );
Expand Down Expand Up @@ -63,7 +64,7 @@
'padding-top': headerHeight() + 'px'
});

content.css({
maincontent.css({
'max-height': 'calc(100vh - ' + ( footerHeight() + headerHeight() ) + 'px)'
});

Expand All @@ -72,7 +73,7 @@
});
} else {

content.css({
maincontent.css({
'max-height': 'calc(100vh - ' + ( footerHeight() + closeHeight() ) + 'px)'
});
}
Expand Down
4 changes: 4 additions & 0 deletions library/scss/hustle-slidein.scss
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@
padding: 0;
overflow: auto;
}

.hustle-main-wrapper {
overflow-y: scroll;
}
}

// Correctly position slide-in.
Expand Down

0 comments on commit 779e02a

Please sign in to comment.