diff --git a/packages/react-native/React/CoreModules/RCTPerfMonitor.mm b/packages/react-native/React/CoreModules/RCTPerfMonitor.mm index 023a5311db2e53..ae157b32a24f34 100644 --- a/packages/react-native/React/CoreModules/RCTPerfMonitor.mm +++ b/packages/react-native/React/CoreModules/RCTPerfMonitor.mm @@ -298,7 +298,11 @@ - (void)show [self updateStats]; - [RCTKeyWindow() addSubview:self.container]; + // This change is causing the performance monitor and element inspector to be added to the dev menus UIWindow + // instead of the main app + // [RCTKeyWindow() addSubview:self.container]; + UIWindow *window = RCTSharedApplication().delegate.window; + [window addSubview:self.container]; _uiDisplayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(threadUpdate:)]; [_uiDisplayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];