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

@fanf done, should I merge ?