Bugfix: Show iframe popup on the top if there is no room on left or right

Story: https://www.pivotaltracker.com/story/show/72254398