We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9fbe761 commit 1055b58Copy full SHA for 1055b58
packages/react-native/React/CoreModules/RCTDevMenu.mm
@@ -409,9 +409,15 @@ - (RCTDevMenuAlertActionHandler)alertActionHandlerForDevItem:(RCTDevMenuItem *__
409
{
410
return ^(__unused UIAlertAction *action) {
411
if (item) {
412
+#if TARGET_OS_VISION
413
+ /// Execute this handler after the action sheet is dismissed to properly retrieve window when using SwiftUI entry point.
414
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0), dispatch_get_main_queue(), ^{
415
+ [item callHandler];
416
+ });
417
+#else
418
[item callHandler];
419
+#endif
420
}
-
421
self->_actionSheet = nil;
422
};
423
0 commit comments