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:
parent
7a98b3fece
commit
7bb6b2569c
|
@ -500,8 +500,8 @@ bool CefWindowImpl::AcceleratorPressed(const ui::Accelerator& accelerator) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefWindowImpl::CanHandleAccelerators() const {
|
bool CefWindowImpl::CanHandleAccelerators() const {
|
||||||
if (delegate() && widget_) {
|
if (delegate() && widget_ && root_view()) {
|
||||||
return widget_->IsActive();
|
return root_view()->CanHandleAccelerators();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue