Trying to create my own version of salesforce listviews in a Lightning Component, got to the point where I can open and filter the drop down list (based on lightning design system: Page Header opening Single Lookup, trying to show/hide the lookup. https://www.lightningdesignsystem.com/components/lookups/#flavor-single https://www.lightningdesignsystem.com/components/page-headers/ ).

I'm trying to be able to close/hide the lookup div when I click anywhere outside the top search input field. I've found plenty of methods but they all contained jQuery (or angular), which I can't use due to the LockerService introduced in Spring 2016 - https://developer.salesforce.com/blogs/developer-relations/2016/04/introducing-lockerservice-lightning-components.html

any suggestions as to how I can achieve this?

1 Answer 1


Can you try this fiddle and let me know?


In this fiddle I have hidden the my div content when the user clicks out of div.

  • Didn't try exactly that, but you pointed me to a solution, thanks! Now I'm trying to do the same except when clicking this and another div.. but the SVG inside it is giving me trouble.
    – Poster
    Jun 15, 2016 at 6:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .