SOAP-1501 Looking at screen real estate rather than main window size when determining direction to fold up popup