Commit 89552ecf authored by Owen Min's avatar Owen Min Committed by Commit Bot

Fix GAIA dialog focus issue when it's displayed with UserManager.

Bug: 816499
Change-Id: Ib3ecf6730908289be6f799c7df39d3667f1552d0
Reviewed-on: https://chromium-review.googlesource.com/937657Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Owen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539422}
parent 4c1f61ac
......@@ -211,6 +211,10 @@ class UserManagerProfileDialogDelegate
webContentsDelegate_.reset(new UserManagerProfileDialogDelegate());
dialogWebContents_->SetDelegate(webContentsDelegate_.get());
// Load the url for the WebContents before constrained window creation so
// that the dialog can get focus properly.
[self show];
base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
[[CustomConstrainedWindowSheet alloc]
initWithCustomWindow:[self window]]);
......@@ -224,7 +228,6 @@ class UserManagerProfileDialogDelegate
auto closeButton = [window standardWindowButton:NSWindowCloseButton];
[closeButton setTarget:self];
[closeButton setAction:@selector(closeButtonClicked:)];
[self show];
}
return self;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment