refactored popup view to use view controller’s containment APIs ref #5