单击标题栏会在 Opera 中触发 onBlur

发布于 2024-08-31 17:49:06 字数 200 浏览 1 评论 0原文

我正在为 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 技术交流群。

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

发布评论

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

评论(1

凉月流沐 2024-09-07 17:49:06

也许可以从父窗口的 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/ ?

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