another try on preventing double scrollbars when a modal is larger than the viewport

This commit is contained in:
Mario Vavti 2017-01-13 13:04:30 +01:00
parent c8678ba5a9
commit 8ea0b2051a
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,6 @@
/* generals */
html {
font-size: 100%;
overflow-x: hidden;
}
body {
@ -21,7 +20,6 @@ body {
background-size: cover;
color: $font_colour;
margin: 0px;
overflow-x: hidden;
}
aside {

View File

@ -99,11 +99,13 @@ function makeFullScreen(full) {
function toggleAside() {
$('#expand-aside-icon').toggleClass('fa-arrow-circle-right').toggleClass('fa-arrow-circle-left');
if($('main').hasClass('region_1-on')){
$('html, body').css('overflow-x', '');
$('main').removeClass('region_1-on')
$('#overlay').remove();
$('#left_aside_wrapper').trigger("sticky_kit:detach");
}
else {
$('html, body').css('overflow-x', 'hidden');
$('main').addClass('region_1-on')
$('<div id="overlay"></div>').appendTo('section');
$('#left_aside_wrapper').stick_in_parent({