Commit 9d10064e authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Commit Bot

Do not focus quick settings when message center goes invisible

This was added previously to make sure focus navigation worked
if notifications were cleared. We only need to activate the quick
settings widget and not focus an element in it.

Bug: 1062219
Change-Id: I7a4ae2ebb007872306e712dcc91a269f990ebbe3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2117151Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753778}
parent ee260006
......@@ -190,6 +190,10 @@ bool UnifiedMessageCenterBubble::FocusOut(bool reverse) {
return tray_->FocusQuickSettings(reverse);
}
void UnifiedMessageCenterBubble::ActivateQuickSettingsBubble() {
tray_->ActivateBubble();
}
void UnifiedMessageCenterBubble::FocusFirstNotification() {
// Move focus to first notification from notification bar if it is visible.
if (message_center_view_->IsNotificationBarVisible())
......
......@@ -54,6 +54,10 @@ class ASH_EXPORT UnifiedMessageCenterBubble : public TrayBubbleBase,
// Relinquish focus and transfer it to the quick settings widget.
bool FocusOut(bool reverse);
// Activate quick settings bubble. Used when the message center is going
// invisible.
void ActivateQuickSettingsBubble();
// Move focus to the first notification.
void FocusFirstNotification();
......
......@@ -411,7 +411,7 @@ void UnifiedMessageCenterView::UpdateVisibility() {
// Transfer focus to quick settings when going invisible.
auto* widget = GetWidget();
if (widget && widget->IsActive())
FocusOut(false);
message_center_bubble_->ActivateQuickSettingsBubble();
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment