auto adjust popover position