mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Never send blur events to specs window
This makes sure that specs that rely on focus behavior don't end up failing because our focus is on an entirely different window.
This commit is contained in:
@@ -12,6 +12,7 @@ class ClientHandler;
|
||||
NSView *_devToolsView;
|
||||
NSString *_bootstrapScript;
|
||||
NSString *_pathToOpen;
|
||||
bool _runningSpecs;
|
||||
|
||||
CefRefPtr<CefV8Context> _atomContext;
|
||||
CefRefPtr<ClientHandler> _clientHandler;
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
}
|
||||
|
||||
- (id)initSpecsWithAtomContext:(CefRefPtr<CefV8Context>)atomContext {
|
||||
_runningSpecs = true;
|
||||
return [self initWithBootstrapScript:@"spec-bootstrap" atomContext:atomContext];
|
||||
}
|
||||
|
||||
@@ -130,7 +131,7 @@
|
||||
|
||||
#pragma mark NSWindowDelegate
|
||||
- (void)windowDidResignMain:(NSNotification *)notification {
|
||||
if (_clientHandler && _clientHandler->GetBrowser()) {
|
||||
if (_clientHandler && _clientHandler->GetBrowser() && !_runningSpecs) {
|
||||
_clientHandler->GetBrowser()->SendFocusEvent(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user