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 aa6202c commit 8148893Copy full SHA for 8148893
packages/react-native/React/CoreModules/RCTDevMenu.mm
@@ -406,9 +406,15 @@ - (RCTDevMenuAlertActionHandler)alertActionHandlerForDevItem:(RCTDevMenuItem *__
406
{
407
return ^(__unused UIAlertAction *action) {
408
if (item) {
409
+#if TARGET_OS_VISION
410
+ /// Execute this handler after the action sheet is dismissed to properly retrieve window when using SwiftUI entry point.
411
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0), dispatch_get_main_queue(), ^{
412
+ [item callHandler];
413
+ });
414
+#else
415
[item callHandler];
416
+#endif
417
}
-
418
self->_actionSheet = nil;
419
};
420
0 commit comments