Show popup on top of the element if on bottom there is no enough space to display it