hides dialog when dragging