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