adjust y position of dialog box to account for scrolling