Popup show/hide toggle functionality with auto hide enabled
365 views
Skip to first unread message
Jonas
unread,
Mar 18, 2012, 5:31:56 PM3/18/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
I have a popup with setAutoHideEnabled (it automatically hides when you click somewhere outside of it). I display it using a button but I want to have toggle functionality. First click shows the popup, then second click on button hides it (but clicking somewhere outside also hides it). The problem is that when I click the button the second time the popup first gets hidden because of auto hide and then is shown again. Any ideas on how to solve this?
I also apply some styling on the button depending on popup visibility, so would like to remove the style when the popup is hidden using autohide.
Jens
unread,
Mar 18, 2012, 5:49:58 PM3/18/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
This should disable the auto hide functionality when clicking on the button, so you can control the popup visibility yourself based on popup.isShowing() when clicking the button.
-- J.
Patrick Tucker
unread,
Mar 19, 2012, 11:33:55 PM3/19/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message