views:

376

answers:

2

I'm leveraging SimpleModal on a small thing I'm working on to open an iFrame and later close it. Says to post here if having issues so here I am.

I'm having issues with the simple modal plug-in for jquery when I go to close the popup, but only on windows with safari. It works in IE/FF/Chrome/Opera on window and works in FF/Safari on Mac, and I have tested this on multiple mac and multiple windows boxes.

after calling "$.modal.close()" and entering the close function it will reach and crash the moment it hits... "s.d.data.hide().remove();" if I remove the .remove() statement making it "s.d.data.hide()//.remove();" it will continue on and then crash the moment it hits the end of the close function where there are 3 more lines with .remove().

s.d.container.hide();//.remove(); s.d.overlay.hide();//.remove(); s.d.iframe && s.d.iframe.hide();//.remove();

Commenting them out as I did above works alright temporarily but JS not being my strongest language I'm not sure what side effects there are by not having the remove statements in place.

A: 

I'd need to see the site or some code that reproduces the problem in order to know what the problem might be.

Eric Martin
+2  A: 

I just had a similar Problem: Only Safari on Windows chrashes if I try to "hide()" an element with jQuery. It seems to be a problem between the Flashplayer and Safari on Windows. The Element I try to hide includes the "Uploadify-Plugin" which makes use of Flash-Content, you said you hide something including a Flex-App. Both of them make use of the Flashplayer.

Workaround: I found a little workaround which is "good-enough" for me: Just do not call hide() but fadeOut(1). The one millisecond is important: as I tried fadeOut(0) it crashed again. sigh

maybe it helps..

Roman
I confirm this. I have the same problem. Hidding the DIV wich contain the uploadify flash element will make Safari on Windows 7 to crash. If I don't hide that DIV the Safari won't crash. To be more specific, the Safari won't crash if I hide that div before uploading a file, but if I try to hide the DIV after a file upload process, on the onComplete event, will make Safari to crash. The fadeOut(1) may work because !!! the hide occur after the onComplete event, not inside it.
pixel3cs
I just tried fadeOut(1) in my case, but 1 millisecond is not enough in my case. fadeOut(1000) works with no problems
pixel3cs