用户在窗口外单击时如何关闭弹出窗口 [英] How to close popup window when user click outside of window

查看:101
本文介绍了用户在窗口外单击时如何关闭弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



单击列表框项时,我只显示弹出的列表框结果。它的工作正常。但每当我点击弹出窗口外。它不会隐藏/关闭。我已经设置了StaysOpen = false。

但它不会工作。任何人都可以建议我这个答案。



在此先感谢。





问候,

Arunkumar M

Hi Everyone,

I just show the list box results in popup when click listbox items. Its working fine. But whenever i click outside of pop up. it wont hide/ close. I have already set StaysOpen=false.
But it wont work. Can anyone please suggest me the answer for this.

Thanks in Advance.


Regards,
Arunkumar M

推荐答案

它不应该表现得像你想要的那样或想你想要的。它会破坏模态行为的目的。模态行为的重点是让用户专注于模态窗口,不允许因任何随机原因而退出模态状态;它应该是严格适当的键盘事件或点击按钮(包括角落里的关闭按钮)。



如果你以某种方式修改这个定义良好和良好的已知的行为,可以混淆用户并增加用户的错误数量。谁会喜欢它?如果您不想要这种模态行为,则不应使用弹出窗口。



-SA
It should not behave like you want or think that you want. It would defeat the purpose of modal behavior. The whole point of modal behavior is to keep the user focused on a modal window, not allowing going out of modal state due to any random reason; it should be strictly the appropriate keyboard event or a click on a button (including the close button in a corner).

If you somehow modify this well defined and well-known behavior, you can confuse the users and boost the number of user's mistake. Who will like it? And if you don't want this modal behavior, you should not use popups.

—SA


这篇关于用户在窗口外单击时如何关闭弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆