From e54cfd050b61c002029b7cabf38cb9623bd0fbbb Mon Sep 17 00:00:00 2001 From: Dominic Go Date: Wed, 2 Oct 2024 19:26:54 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Fix:=20`ModalSheetView`=20Focus?= =?UTF-8?q?=20Event?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Temp/ModalEventManager/ModalEventsManager.swift | 2 ++ ios/Temp/ModalEventManager/ModalRegistry.swift | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/Temp/ModalEventManager/ModalEventsManager.swift b/ios/Temp/ModalEventManager/ModalEventsManager.swift index 2d218d9..e9ef256 100644 --- a/ios/Temp/ModalEventManager/ModalEventsManager.swift +++ b/ios/Temp/ModalEventManager/ModalEventsManager.swift @@ -144,6 +144,8 @@ public final class ModalEventsManager { modalEntries.otherModals?.forEach { $0.setModalFocusState(.blurred); }; + + eventManager.modalRegistry.removeEntry(forViewController: modalVC); }; }; diff --git a/ios/Temp/ModalEventManager/ModalRegistry.swift b/ios/Temp/ModalEventManager/ModalRegistry.swift index 27aec53..748bbbb 100644 --- a/ios/Temp/ModalEventManager/ModalRegistry.swift +++ b/ios/Temp/ModalEventManager/ModalRegistry.swift @@ -70,7 +70,7 @@ public class ModalRegistry { public func getEntriesSorted() -> [ModalRegistryEntry] { self.registry.values.sorted { - $0.modalFocusIndex > $1.modalFocusIndex; + $0.modalFocusIndex < $1.modalFocusIndex; }; };