PopUp Window with Leaflet Map

We are using Vaadin 8 and have a modal sub-window with some text and a Leaflet map. The modal sub-window should close if the user clicks anywhere on the window but not when the Leaflet map is clicked.

Now the leaflet controls do not cause a windows event when clicked. But a click on the map itself does cause a windows event. Why?
What do I need to do, to not cause a windows event when the map is clicked? If I would be able to exlude the map then I could register a click listener with the window to close the window.