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