Prevent dialog top from going past top of screen.