IE7跨域iFrame Select问题
我有一个 iframe,其中包含一些用于数据输入的选择下拉列表。我最近开始注意到,用鼠标单击 iframe 中的选择元素,下拉列表不会展开。用户可以单击下拉菜单将焦点设置在其上,然后使用键盘上的向上/向下箭头滚动浏览内容,但单击列表旁边的箭头按钮不会导致其展开和展开。显示其内容。
该框架嵌入的父页面位于不同的域中。最初我认为这可能与 iframe 中的 javascript onfocus 事件有关。我剥离了所有脚本,摆脱了所有 css,并将其削减为一个简单的静态 html 父级,其中包含一个仅包含 select 元素的静态 html 的简单 iframe 页面。在同一服务器上运行时,下拉列表行为正常,但当父页面驻留在一个域上,而 iframe 内容驻留在另一个域上时,选择列表无法展开。
这个问题似乎只出现在IE7中。我已经在 IE8 和 IE8 中进行了测试IE9 没有任何问题,Safari、Chrome 和 Safari 也没有任何问题。火狐。我发现上周出现的几篇博客文章(链接如下)似乎遇到了同样的问题,但没有解决方案。
http://scrumpy-jack.com/post/11177166236/html-select-crazy-egg-ie-and-iframes-updated
有人找到了解决此问题的方法吗?
I have an iframe which contains a few select drop-down lists for data entry. I recently began noticing that mouse-clicking the select element in the iframe, the drop-down list doesn't expand. The user can click on the drop-down to set focus on it, and then scroll through the contents using up/down arrow on the keyboard, but clicking the arrow button beside the list doesn't cause it to expand & show its contents.
The parent page this frame is embedded on resides on a different domain. Initially I thought this might have something to do with javascript onfocus events within the iframe. I stripped out all of the scripting, got rid of all of the css and pared it down to a simple static html parent with a simple iframe page of static html containing just a select element. When run on the same server, the dropdown behaves normally, but when the parent page resides on one domain, and the iframe content on another, the select list cannot be expanded.
This problem only seems to occur in IE7. I've tested in IE8 & IE9 without any problems, as well in Safari, Chrome & Firefox. I found a couple of blog posts (links below) that cropped up within the last week that seem to be running in to the same problem, but no resolution.
http://scrumpy-jack.com/post/11177166236/html-select-crazy-egg-ie-and-iframes-updated
Has anyone found a solution to this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们针对此问题制定了解决方法,将标准下拉菜单替换为仅适用于 IE7 用户的 JQuery 下拉菜单。我们开发了一个脚本并将其放在一些 IE 条件标记之间。
我们迫不及待地等待 MS 发布另一个补丁!
We put in place a workaround for this issue by swapping out the standard drop down menus with JQuery drop downs for IE7 users only. We developed a script and dropped it between some IE conditional tags.
We couldn't wait for MS to issue another patch!
显然,此错误是由于刚刚发布的安全更新 (2586448) 造成的:
http://support.microsoft。 com/kb/2628724
Apparently this bug is due to a security update that was just released (2586448):
http://support.microsoft.com/kb/2628724