Making a widget popup/popover another widget

I tried to do the same in one widget, however, it did not work. After splitting it in two widget - the main widget and the popover widget - it worked. The related question as well as the YAML code can be found here:

CustomWidget PopOver - Item from parameter does not use the configuration of the specific widget, but the last widget