Hey all, is there a on blur event for an element? In other words, how can I trigger an event for a layer when anything but that layer is clicked?
It would help if you show what you're trying to do.
Are you trying to create a behavior to dismiss a foreground layer (like a modal or a contextual menu)?
Because if that's the case you can create two new layers, one for your menu/modal and one transparent layer beneath the menu layer... That layer won't affect anything visually but allows you to trigger an event when anything but the focus layer is clicked.
I'm making a form and wanted to create a class for dropdowns. I suppose when you click the select I could create a new layer that sits behind the select and spans the entire device screen, and could just destroy it when you click it.