Calculate position popUp before it show