From 661ee7ad8457b0332ad452b507da7648c0a5f771 Mon Sep 17 00:00:00 2001 From: Dominic Go Date: Wed, 2 Oct 2024 20:13:17 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Fix:=20`ModalSheetView`=20Focus?= =?UTF-8?q?=20Event=20(Again)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Temp/ModalEventManager/ModalEventsManager.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ios/Temp/ModalEventManager/ModalEventsManager.swift b/ios/Temp/ModalEventManager/ModalEventsManager.swift index e9ef256..0fe85fb 100644 --- a/ios/Temp/ModalEventManager/ModalEventsManager.swift +++ b/ios/Temp/ModalEventManager/ModalEventsManager.swift @@ -133,6 +133,14 @@ public final class ModalEventsManager { return }; + let didDismiss = + modalVC.view.window == nil + || !modalVC.isPresentedAsModal; + + guard didDismiss else { + return; + }; + let eventManager = ModalEventsManagerRegistry.shared.getManager(forWindow: targetWindow);