custom overlay component


What would be the easiest way to position a component anywhere on the screen, so like an overlay, but not using Window or PopupView (which both behave differently from what I need)?

I also need to be able to detect clicks outside the component in order to hide it, but I guess I’ll need custom javascript for that.



check out the
PopupButton add-on from the directory
. If you don’t want the button part, see the
source code on how it handles the overlay
; that should give you some hints on building your own. The isOrHasChildOfPopup method does the detecting if a clicked element is inside the popup.