Consider border size when calulcating popup position