Facebook 和 Twitter iframe 交叉路径
我在我的网站上放置了“推文”按钮和“Facebook 点赞”按钮。它们在大多数区域工作正常,但我有一个模式弹出窗口(保留在内容窗口内的弹出窗口),这导致了一些奇怪的行为。基本上,在随机页面加载时,facebook iframe 将加载 twitter 的内容,反之亦然。有时有两个 facebook 按钮,有时有两个 twitter 按钮,有时 facebook 按钮将位于 twitter 按钮的位置,反之亦然。它只倾向于在 Firefox 中发生并且仅在某些计算机上发生。我最好的猜测是 src 流交叉路径,但在使用按钮的其他地方似乎不会发生这种情况。
我会粘贴代码,但它与地球上其他人用于这些按钮的代码完全相同。有什么想法吗?
更新: 我的一位同事发现了类似的 FireFox 错误: https://bugzilla.mozilla.org/show_bug .cgi?id=431613
他们的解决方案是在页面加载时将 iframe 源设置为自身。仍在测试它,但不幸的是它似乎只能在实时服务器上重现,这让我相信这可能与 Facebook 和 Twitter 访问它有关。
I'm putting Tweet buttons and Facebook Like buttons on my site. They work fine in most areas but I have a modal popup (a popup that stays within the content window) that's causing some strange behavior. Basically on random page loads the facebook iframe will load twitter's content and visa versa. Some times there are two facebook buttons, some times there are two twitter buttons, and some times the facebook button will be in the place of the twitter button and visa versa. It only tends to happen in firefox and only on certain computers. My best guess is that the src streams are crossing paths but that doesn't seem to happen in other spots where the buttons are used.
I'd paste in the code, but it's the exact same code that everyone else on the planet is using for these buttons. Any thoughts?
UPDATE:
A coworker of mine found a similar FireFox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=431613
Their resolution was to set the iframe source to itself on page load. Still testing it, but unfortunately it only seems to be reproducible on live servers, which leads me to believe it might have something to do with Facebook and Twitter accessing it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于那些感兴趣的人,我在 Mozilla Bugs 上发现了这个错误: https://bugzilla.mozilla.org /show_bug.cgi?id=431613
我的问题的解决方案是将 Tweet 按钮移至 iframe 版本(在我使用他们的 javascript Tweet 按钮在页面加载时动态加载 iframe 之前)并使用设置iframe.src 在页面加载时返回到自身(该 bugzilla 站点的错误报告中提到了这一点)。
奇怪的奇怪的错误。
For those interested, I found this bug on Mozilla Bugs: https://bugzilla.mozilla.org/show_bug.cgi?id=431613
The solution to my issue was to move the Tweet button to the iframe version (before I was using their javascript Tweet button which dynamically loads the iframe when the page loads) and using setting the iframe.src to itself on page load (which is mentioned in the bug report on that bugzilla site).
Weird weird bug.