Cancelled fullscreen exit gesture leaves bad state for next exit request.
[WebKit-https.git] / Source / WebKit / UIProcess / ios / fullscreen / WKFullScreenWindowControllerIOS.mm
index 1665c3e..4edd94b 100644 (file)
@@ -977,15 +977,12 @@ static const NSTimeInterval kAnimationDuration = 0.2;
         if (![self._webView _page])
             return;
 
-
-        if (_interactiveDismissTransitionCoordinator.get().animator.context.transitionWasCancelled) {
+        if (_interactiveDismissTransitionCoordinator.get().animator.context.transitionWasCancelled)
             [_fullscreenViewController setAnimating:NO];
-            return;
-        }
-
+        else
+            [self _completedExitFullScreen];
+        
         _interactiveDismissTransitionCoordinator = nil;
-
-        [self _completedExitFullScreen];
     }];
 }