diff --git a/atom/browser/ui/accelerator_util.cc b/atom/browser/ui/accelerator_util.cc index eb89bf0c35f5..b71ba1310b35 100644 --- a/atom/browser/ui/accelerator_util.cc +++ b/atom/browser/ui/accelerator_util.cc @@ -90,11 +90,12 @@ bool TriggerAcceleratorTableCommand(AcceleratorTable* table, const ui::Accelerator& accelerator) { if (ContainsKey(*table, accelerator)) { const accelerator_util::MenuItem& item = (*table)[accelerator]; - item.model->ActivatedAt(item.position); - return true; - } else { - return false; + if (item.model->IsEnabledAt(item.position)) { + item.model->ActivatedAt(item.position); + return true; + } } + return false; } } // namespace accelerator_util