В модальном окне не убирается скролл
В чем может быть ошибка кто знает?
Стрелкой я указал лишний скролл, то есть фрейм где светло-серый бэкграунд не зафиксирован
<a class="btn btn-info" href="/hack_shouts" onclick="return showModal(this, 'Быстрые объявления');" style='position:fixed; bottom: 20px; left: 20px;'><img style="margin-top: 5px;" alt="Chat" src="/images/chat.png" width="32px" class="fl-l" /> <p class="pl-1 fl-r pt-1">В чате: <img style="" alt="ustg" src="/images/ustg.png" width="16px" />{$chat_users}</p></a>
{literal}<script>
modalW=(document.body.clientWidth);
modalH=(document.body.clientHeight);
function showModal(self,title){
document.getElementById("welcome").style.display = "block";
var body = document.getElementsByTagName('body')[0];
body.style.overflow = "hidden";
document.getElementById('mwt').innerHTML=title;
var modal=document.getElementById('modalWindow');
var iframe=modal.getElementsByTagName('iframe')[0];
iframe.src=self.href;
document.getElementById('my_frame').style.width="100%";
document.getElementById('my_frame').style.height=modalH-222;
/*modal.style.marginTop=document.body.scrollTop180;*/
modal.style.display='block';
return false;
}
function hideModal(){
var body=document.getElementsByTagName("body")[0];
body.style.overflow = 'auto';
var modal=document.getElementById('modalWindow');
var iframe=modal.getElementsByTagName('iframe')[0];
iframe.src="about:blank";
modal.style.display='none';
document.getElementById("welcome").style.display = "none";
document.getElementById('modalWindow').style.display = 'none';
return false;
}
</script>
<style>
.modal-window{position:absolute;bottom:0px;left:0px;z-index:100;background: #333; border-radius:1px; left:3px;width:99.9%;overflow-y:hidden;}
.modal-window-navbar{
position:inline; cursor:pointer; height:10%;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
}
.modal-window-title{position:inline; }
.modal-window-close{position:inline; cursor:pointer; width:auto;}
.modal-window-content{padding:5px;}
#welcome{z-index:99;position:fixed;background-color:#000;opacity:0.8;-moz-opacity:0.8;filter:alpha(opacity=80);width:100%;height:100%;top:0;left:0;cursor:pointer;display:none;}
#modal-info{position:absolute;top:5px;left:20px;z-index:100;background: #000; width: auto; max-width:90%; height: auto;}
</style>
{/literal}