opening and closing dialogs now restores scrollTop