单击标题栏会在 Opera 中触发 onBlur
我正在为 ASP 网页的“BODY”定义的“onBlur”处关闭一个弹出窗口,因此当用户在弹出窗口外部单击时,弹出窗口将关闭。我希望弹出窗口可以在屏幕上移动,并且它适用于除 Opera 之外的所有浏览器。
在 Opera 中,单击弹出窗口的标题栏时会触发“onBlur”事件 - 这对我来说似乎很奇怪,因为标题栏是弹出窗口的一部分,对吧?
我能做什么呢?
I am closing a popup window at 'onBlur' defined for 'BODY' of an ASP webpage, so when a user clicks outside the popup the popup closes. I want the popup to be moveable around the screen and it works for all browsers but Opera.
In Opera the 'onBlur' event is fired when clicking the titlebar of the popup - this seems weird for me, as the titlebar is a part of the popup window, right?
What can I do about it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许可以从父窗口的 onfocus 关闭弹出窗口?
我可以根据此测试确认问题:
javascript:void(window.open('data:text/html,window.onblur=window.close', '', 'width=100,height=100'));
也许您可以在 https://bugs.opera.com/wizard/ 上报告错误?
Perhaps close the popup from the parent window's onfocus instead?
I can confirm the problem based on this test:
javascript:void(window.open('data:text/html,window.onblur=window.close', '', 'width=100,height=100'));
Perhaps you could report a bug on https://bugs.opera.com/wizard/ ?