codrops / ThumbnailGridExpandingPreview

A tutorial on how to create a thumbnail grid with an expanding image preview similar to the effect seen on Google Images.
360 stars 143 forks source link

Preview box automatically closes after click on ie8 #14

Open ghost opened 9 years ago

ghost commented 9 years ago

I tried this with the official demo as well thinking that some of the changes I made to the code had broken the plugin but the same happens:

On IE 8 whenever I click on a thumbnail to open the preview, the preview opens and is automatically closed instantly.

Is there a way to fix this? Or is IE 8 support not part of the picture?

Thanks in advance!

ghost commented 9 years ago

I found that when I comment the following part of the code it works fine on IE 8 and doesn't seems to break anything on the other browsers:

// on window resize get the window´s size again // reset some values.. $window.on( 'debouncedresize', function() { ...
// Comment this: // if( typeof preview != 'undefined' ) { // hidePreview(); // } } );

ursbraem commented 9 years ago

I experienced thhe same behaviour in Chrome 36 on iOS. I'll check if your fix works there too

vasnakos commented 9 years ago

Had the same issue and the solution @aholsteinson worked for me! Thanks alot!