overlay not removed after close
i have load fancybox with iframe content via javascript
function aboCheck(url) {
$.fancybox({ href: url, title : 'Veranstaltungs-Abo', type: 'iframe', height: 700, width:880 });
return false;
}
this is triggered from an select option. everything works so far. the html-page is being loaded.
but when i know klick on the close -button the iframe is being removed, but the main page will not come back. also the esc-key is not working.
the following div stays:
<div class="fancybox-overlay fancybox-overlay-fixed" style="width: auto; height: auto; display: block; opacity: 1;"></div>
so i see the main page with the grey overlay but i cant do anything on the page.
i am using the latest version of jquery.fancybox.js
Can not help without seeing your page.
I had the same error, are you using HTML5/any boilerplate by any chance?
Trying to figure out the problem right now. It disappeared when I remove all other CSS and JS. Investigating..
Without any additional info this is just a guessing game.
- What jQuery and fancyBox version are you using?
- What browser / OS are you testing on?
- Have you checked the console for JavaScript errors?
I upgraded to latest fancy box and that error disappeared.
it now works. added doctype at the start and fixed a small html-bugs (cloing tags). it now works (mostly). IE8 seems to be very buggy. on one page it works on the other it does not work. iframe fancybox comes up, but i can't see the iframe-contents, in antoher fancybox where i display an imgage the underlying page will show throuhg.
any further help or hints with IE8. in firefox and safari it works on each page.
If http://fancyapps.com/fancybox/#examples works fine for you (it does fine for me), then:
- check if you have the latest version of jQuery and fancyBox
- look for any JavaScript errors using developer tools
- check if you have a valid HTML and DOCTYPE
- if you have made a modifications, then check if they are causing the issue
- check if your CSS is conflicting with fancyBox (for example, changing overflow property for
htmltag)
Try using a more recent version of jquery or disable the closeEffect of Fancybox, this fixed the problem for me.
I had this problem with jquery 1.4.4 and fancybox 2.1.0.
I also have the same problem. jQuery 1.4.4 here. Thimp's workaround does work, but I was hoping to have a close effect.
It is not recommended to use jQuery prior v 1.6. The script might work, but is not tested.
fancyapps, I'm using Drupal and there isn't much choice...
I have tested with jQuery 1.7 by forcing it into the Drupal frontend, and it did work as expected.
Hello,
I've the same problem, I'm on Magento 1.7.2, Fancybox 2.1.1, I use Firefox, Jquery.1.7.min and when I want to close my popup with jQuery.fancybox.close() or parent.jQuery.fancybox.close() it doesn't work !
I have no errors in my JS, I check the CSS and all.
@Kaherdin any demo? It is hard to believe you without seeing your page. Works fine for me.
I have the same issue now. Overlay is not removed when fancybox closes. Also; the afterClose event is also not fired when using parent.$.fancybox.close(true);
Any idea what this can be? I open fancybox like this:
$(".fancybox").fancybox({
type: 'iframe',
fitToView : true,
width : '100%',
height : '100%',
autoSize : false,
closeClick : false,
openEffect : 'none',
closeEffect : 'none',
scrolling : 'auto',
preload : true,
afterClose : function(e){
console.log('Closing fancybox');
},
beforeClose : function(){
},
afterLoad : function(){
},
afterShow : function(e){
}
});
A little comment. When clicking on the X (top right) then everything works like expected. Don't do handle the same actions?
https://codepen.io/anon/pen/WGVVjq
Upd This commit https://github.com/fancyapps/fancyBox/pull/525/files can help possible.