pop up window not working fully

Pop up window when pressing add food to freezer. Doesn't close window
when returning to overview but instead continues in the new window.