Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
custom overlay component
Hello,
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.
Thanks
Herman
Hi,
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.
-Olli