0

Issue only occurs upon closing the fancybox (v2.15) iframe.

The issue seems to be in IE8 on win xp only, doesn't apply to IE7 - not tested in other OS but other browsers work absolutely fine, the page loses the google font and reverts to the backup fonts in the css file. Using google webfont implementation and also tried the @font-face method but the same thing happens.

Site uses PIE for css3 in IE but have disabled that to make sure that is no causing any issues and it is not at fault so re-enabled it.

Searched the web for answers but could not find anything specific to my issue with a resolution. Found this but did not work: https://groups.google.com/forum/#!topic/fancybox/6tklf4D9EqA

I've also tried to force a redraw of the page when closing the popup to see if that would help but no such luck either:

    $(".thickbox").fancybox({
     type: 'iframe',
     width: 640,
     autoHeight: true,
     padding:10,
     title: null,
     scrolling: 'no',
     preload: true,
      beforeClose: function() {
         parent.jQuery('body').css('display', 'none');
      },
      afterClose: function() {
         parent.jQuery('body').css('display', 'block');
      }
    });

To add to the font changing, the images on the product tabs also get messed up when clicking on the tab after the iframe has been closed.

Can't remember this being an issue before upgrading to fancybox 2.

Just noticed that if I click the compatibility view button in IE8, the issue with the font no longer exists when closing the fancybox popup (it does however break a lot of other stuff on the site beforehand).

If you're listening JFK you're knowledge but be a massive help and anyone else with any ideas please fire away, been on this hours and hours and the wall my head is banging won't budge!

mackwizard
  • 85
  • 7
  • For testing, try removing the `` declaration and set the `DOCTYPE` as the very first line of your document. Also, this `` won't work if you are not using an HTML5 DOCTYPE. Last, [validating](http://validator.w3.org/check?uri=http://www.tradepricebatteries.co.uk/acacom391172-001-hp-compaq-6735s-ac-adapter) your page won't hurt. – JFK Jul 16 '13 at 19:46
  • Check this one too http://stackoverflow.com/q/1335133/1055987 – JFK Jul 16 '13 at 19:49
  • Thank you for your response. I've tried removing the declaration and set DOCTYPE as the first line but still the same issue. Removed too - thanks for that. Working through validation now, got rid of over half - thanks for pointing that out.. have been using html tidy for firefox which reports no errors! Not convinced these validation errors will cause the issues described after closing the fancybox though? – mackwizard Jul 17 '13 at 09:46
  • Removed all validation errors - changed doctype to html5 but the problem still persists – mackwizard Jul 17 '13 at 11:59
  • Also noticed that fter closing the fancybox window and losing font, when another fancybox is opened the font goes back to what it should be until the window is closed again – mackwizard Jul 17 '13 at 16:19
  • Can't reproduce the issue IE7 on Vista. Could you try `iframe: { preload: false }` as in http://stackoverflow.com/a/14828632/1055987 ? – JFK Jul 18 '13 at 00:16
  • Still no luck, updated to the code as suggested but the exact same issue happens – mackwizard Jul 18 '13 at 07:31
  • @JFK Added javascript alert for beforeclose and afterclose to make it more obvious to when the font changes. Also want to confirm that this only happens when using type: `iframe`, other types do not cause the same issue. Clicking on product image will demonstrate this – mackwizard Jul 18 '13 at 09:10
  • Sorry I can't help. I saw your alerts but font didn't change in IE7/Windows Vista – JFK Jul 18 '13 at 16:00
  • Thanks for your help. Can you recommend anywhere/one else who might be able to help? @JFK – mackwizard Jul 19 '13 at 07:45
  • 1
    try here https://github.com/fancyapps/fancyBox/issues – JFK Jul 19 '13 at 07:54
  • This actually only seems to be a problem on IE8 - just downloaded an emulator to check properly. Are you able to test on IE8 for vista please? @JFK – mackwizard Jul 19 '13 at 13:14

1 Answers1

0

I could find a resolution for this, tried everything that I could find.

A 'fix' if you could call it that was to change the type to 'ajax' for the banners on the links that didn't really need to be an iframe. The links that do need to be an iframe I had to resort to making the parent window refresh with the afterClose command for IE 7 & 8 only.

mackwizard
  • 85
  • 7