File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/react-native/React/CoreModules Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -142,10 +142,10 @@ - (void)showMessage:(NSString *)message color:(RCTUIColor *)color backgroundColo
142
142
styleMask: NSWindowStyleMaskBorderless
143
143
backing: NSBackingStoreBuffered
144
144
defer: YES ];
145
- self->_window .releasedWhenClosed = NO ;
146
145
self->_window .backgroundColor = [NSColor clearColor ];
147
146
148
147
NSTextField *label = [[NSTextField alloc ] initWithFrame: self ->_window.contentView.bounds];
148
+ label.font = [NSFont monospacedDigitSystemFontOfSize: 12.0 weight: NSFontWeightRegular ];
149
149
label.alignment = NSTextAlignmentCenter;
150
150
label.bezeled = NO ;
151
151
label.editable = NO ;
@@ -169,7 +169,11 @@ - (void)showMessage:(NSString *)message color:(RCTUIColor *)color backgroundColo
169
169
self->_label .textColor = color;
170
170
171
171
self->_label .backgroundColor = backgroundColor;
172
- [RCTKeyWindow () beginSheet: self ->_window completionHandler: nil ];
172
+ if (![[RCTKeyWindow () sheets ] doesContain: self ->_window]) {
173
+ [RCTKeyWindow () beginSheet: self ->_window completionHandler: ^(NSModalResponse returnCode) {
174
+ [self ->_window orderOut: self ];
175
+ }];
176
+ }
173
177
#endif // macOS]
174
178
});
175
179
You can’t perform that action at this time.
0 commit comments