fancybox icon indicating copy to clipboard operation
fancybox copied to clipboard

overlay not removed after close

Open markusweb opened this issue 14 years ago • 15 comments

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

markusweb avatar Sep 20 '12 14:09 markusweb

Can not help without seeing your page.

fancyapps avatar Sep 20 '12 14:09 fancyapps

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..

markushedlund avatar Sep 21 '12 09:09 markushedlund

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?

fancyapps avatar Sep 21 '12 13:09 fancyapps

I upgraded to latest fancy box and that error disappeared.

markushedlund avatar Sep 21 '12 13:09 markushedlund

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.

markusweb avatar Sep 24 '12 10:09 markusweb

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 html tag)

fancyapps avatar Sep 24 '12 11:09 fancyapps

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.

Thimp avatar Sep 24 '12 14:09 Thimp

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.

fidelix avatar Oct 09 '12 13:10 fidelix

It is not recommended to use jQuery prior v 1.6. The script might work, but is not tested.

fancyapps avatar Oct 09 '12 15:10 fancyapps

fancyapps, I'm using Drupal and there isn't much choice...

fidelix avatar Oct 09 '12 15:10 fidelix

I have tested with jQuery 1.7 by forcing it into the Drupal frontend, and it did work as expected.

fidelix avatar Oct 09 '12 15:10 fidelix

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 avatar Oct 11 '12 13:10 Kaherdin

@Kaherdin any demo? It is hard to believe you without seeing your page. Works fine for me.

fancyapps avatar Oct 11 '12 13:10 fancyapps

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?

digitalhuman avatar Oct 05 '16 09:10 digitalhuman

https://codepen.io/anon/pen/WGVVjq

Upd This commit https://github.com/fancyapps/fancyBox/pull/525/files can help possible.

AkselMJ avatar Nov 02 '16 05:11 AkselMJ