fix: incorrect view ordering for customButtonsOnHover (#15997)

This commit is contained in:
Shelley Vohr 2018-12-10 12:27:38 -08:00 committed by Michelle Tilley
parent 9f472acf80
commit 15f8d15b1b
4 changed files with 21 additions and 18 deletions

View file

@ -63,7 +63,12 @@ void BrowserWindow::OverrideNSWindowContentView(
NSView* webView = iwc->GetView()->GetNativeView();
NSView* contentView = [window()->GetNativeWindow() contentView];
[webView setFrame:[contentView bounds]];
[contentView addSubview:webView];
// ensure that buttons view is floated to top of view hierarchy
NSArray* subviews = [contentView subviews];
NSView* last = subviews.lastObject;
[contentView addSubview:webView positioned:NSWindowBelow relativeTo:last];
[contentView viewDidMoveToWindow];
}