Sets popup height dynamically