From e5a57b02d806b76b1006da70f584e7beca5e343f Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 7 Aug 2014 10:48:02 +0800 Subject: [PATCH] Focus on devtools when it is opened on Mac. --- brightray/browser/mac/bry_inspectable_web_contents_view.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/brightray/browser/mac/bry_inspectable_web_contents_view.mm b/brightray/browser/mac/bry_inspectable_web_contents_view.mm index 084389dd92c0..a0e446338104 100644 --- a/brightray/browser/mac/bry_inspectable_web_contents_view.mm +++ b/brightray/browser/mac/bry_inspectable_web_contents_view.mm @@ -55,6 +55,9 @@ using namespace brightray; // sizes for them until the setContentsResizingStrategy message. [self addSubview:devToolsView positioned:NSWindowBelow relativeTo:nil]; [self update]; + + // Focus on web view. + devToolsWebContents->RestoreFocus(); } else { gfx::ScopedNSDisableScreenUpdates disabler; devToolsWebContents->RemoveOverlayView();