Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted

1 solution

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
 
Share this answer
 
Comments
Arunkumar Murugesan 21-Sep-14 11:54am    
Thank you so much Sergey. I have included the close button to close the window. But in my case i need to hide the popup when we mouse click outside of popup. But i dont know whether the possibilities are there.

Regards,
Arunkumar M
Sergey Alexandrovich Kryukov 21-Sep-14 12:28pm    
My answer to this is: then it should not be "popup", should be something else. Perhaps people did not develop such behavior because they wanted consistent UI.
When you say "in my case I need to...", you don't motivate it in any way. You would not need to motivate it if you tried to create the UI design consistent with well-established expectations, but if you don't, you need a good reason for breaking the common rules...
—SA
Arunkumar Murugesan 22-Sep-14 6:04am    
Hi Sergey, I dont want to breaking the common rules. When we mouse mouse enter into the button one popup window will open. When we mouse leave it will stay there. But when we click outside of popup it will close. This is only i want.
Sergey Alexandrovich Kryukov 22-Sep-14 10:37am    
But the common rule is to not close anything on the click outside; possibly showing blinking, playing a sound...
—SA
Arunkumar Murugesan 22-Sep-14 23:39pm    
Ok.Could you please provide how to blink the popup and make sound.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900