diff --git a/brightray/browser/notification_presenter_mac.mm b/brightray/browser/notification_presenter_mac.mm index a52da634203..4c27f48f015 100644 --- a/brightray/browser/notification_presenter_mac.mm +++ b/brightray/browser/notification_presenter_mac.mm @@ -83,6 +83,16 @@ void NotificationPresenterMac::ShowNotification( host->DesktopNotificationPostDisplay(ID.notification_id); } +- (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification { + auto ID = brightray::GetID(notification); + + auto host = content::RenderViewHost::FromID(ID.render_process_id, ID.render_view_id); + if (!host) + return; + + host->DesktopNotificationPostClick(ID.notification_id); +} + - (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification { // Display notifications even if the app is active. return YES;