Fixed a bug where a large dialog would show a scrollbar, but when clicking the scrollbar the popup would disappear.