fix: incorrect view ordering for customButtonsOnHover (#15564) (#16002)

This commit is contained in:
trop[bot] 2018-12-10 13:44:59 -08:00 committed by Michelle Tilley
parent 6de26d3b4a
commit 2046d8052a
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];
}