Managed to make background and popup communicate