Fix dialog during browser resize