close drawer if user tries to resize the window