I have created a dropdown menu which shows when the profile icon is clicked.
Now, I want this dropdown to vanish when the person clicks outside.
Right now when the profile icon is clicked, the dropdown menu shows. In order to close the dropdown menu, the person has to again click the profile icon. This is creating an annoyance in UX.
The action I want to achieve is very similar to the one used by bubble forum when you click the profile icon
I fixed it by adding “hide” when clicking the group outside (outside i mean by clicking the group that contains the whole page) with a condition, only if element is opened. I then added CSS to show the default icon and not the hand.
Go to Workflow, choose “An element is clicked” select the element (eg. Group page content). Then add an action, element actions, hide, choose the repeating group as the element you want to hide and Only when repeating group is visible.
You then need to add the plugin Classify and add the style cursor:pointer!important; to the RG so that you don’t see the hand when you move your mouse around the rest of the screen.
Can you show me how to do that using group focus? This seems easier for now as I can change from floating group to group focus. I have never used this element before. Any relevant tutorial (Youtube or something like that) would also do!
Grab a group focus from the element navigator and plop it on the page. It doesn’t matter where you plop it cos it will automatically replop itself into the top left corner.
Once the GF has self plopped, insert the name of the element you want to use as a reference into the reference field. Watch as it replops itself again, but this time to right below your ref element.
Once you have done that you can nicely resize the GF and position it using the top and left offsets.
Add a workflow event on clicking of your reference element to toggle the GF.
At this point you have a highly user friendly drop down menu that disappears when a user clicks away. Just add your text elements / images / icons etc to provide the user navigation options.
Yep, the reason I did not mention group focus is because the behaviour on mobile is dreadful. Had to stop using it. On IO’s its even worse. For me having a mobile responsive web app that works well is very important. But if mobile is not important to you group focus is the way to go. Although would be very difficult to understand in todays age why your website is not responsive.
Have a group that is not visible until the drop down is visible. This group should have no background, so it is transparent. It should fill your entire page and be on top of all elements but underneath the drop down element.
Then set workflow for when that transparent group is clicked to close your drop down.
You can do some version of that.
If you want you can use Z-index to help with positioning the elements on top of one another.