Fixes #5492: Size of popup is now correctly computed based on data

done in  	e414f4d