JQuery SimpleModal 在带有 Safari 的窗口中关闭时崩溃

发布于 2024-08-15 01:26:20 字数 595 浏览 1 评论 0原文

我正在利用 SimpleModal 来处理一个小事情,打开一个 iFrame,然后关闭它。说如果有问题就在这里发帖,所以我就在这里。

当我关闭弹出窗口时,我遇到了 jquery 的简单模态插件的问题,但仅限于带有 safari 的窗口。它可以在 Windows 上的 IE/FF/Chrome/Opera 中运行,在 Mac 上的 FF/Safari 中运行,我已经在多个 Mac 和多个 Windows 盒子上进行了测试。

调用“$.modal.close()”并进入关闭函数后,它将到达并在它击中时崩溃...... “sddata.hide().remove();”如果我删除 .remove() 语句,使其成为“sddata.hide()//.remove();”它将继续运行,然后在到达 close 函数末尾时崩溃,其中还有 3 行带有 .remove() 的代码。

sdcontainer.hide();//.remove(); sdoverlay.hide();//.remove(); sdiframe && sdiframe.hide();//.remove();

像我上面所做的那样,暂时注释掉它们是可以的,但是 JS 不是我最强的语言,我不确定没有删除语句会产生什么副作用。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

转角预定愛 2024-08-22 01:26:20

我刚刚遇到了类似的问题:
如果我尝试使用 jQuery“隐藏()”元素,则只有 Windows 上的 Safari 会崩溃。
这似乎是 Windows 上 Flashplayer 和 Safari 之间的问题。
我尝试隐藏的元素包括使用 Flash-Content 的“Uploadify-Plugin”,您说您隐藏了包括 Flex-App 在内的某些内容。他们都使用Flashplayer。

解决方法:
我找到了一个对我来说“足够好”的解决方法:
只是不要调用 hide() 而是 fadeOut(1)。
一毫秒很重要:当我尝试 fadeOut(0) 时,它再次崩溃了。 叹息

也许有帮助..

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

陈独秀 2024-08-22 01:26:20

我需要查看重现问题的网站或一些代码,才能知道问题可能是什么。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文