mac: Fix accelerators in overlay BrowserView (see #3188)

CefWindowImpl::CanHandleAccelerators was returning false for
accelerators triggered in the overlay BrowserView due to
IsWindowKey (called from NativeWidgetMac::IsActive) returning
false. View::CanHandleAccelerators, on the other hand, only
checks IsActive for Aura (non-MacOS) windows. We therefore
delegate to the View implementation for consistent handling.
This commit is contained in:
Marshall Greenblatt 2024-11-04 14:17:30 -05:00
parent 0255c2e7ac
commit 43fc50a89e
1 changed files with 2 additions and 2 deletions

View File

@ -500,8 +500,8 @@ bool CefWindowImpl::AcceleratorPressed(const ui::Accelerator& accelerator) {
}
bool CefWindowImpl::CanHandleAccelerators() const {
if (delegate() && widget_) {
return widget_->IsActive();
if (delegate() && widget_ && root_view()) {
return root_view()->CanHandleAccelerators();
}
return false;
}