From dc41fe2610d310063d287032cd8a2b0c1ca3da5f Mon Sep 17 00:00:00 2001 From: Becky Siegel Date: Mon, 14 Nov 2016 09:49:11 -0800 Subject: [PATCH] Fix issue where keyboard shortcuts don't appear Previously on a change view, if you click either the expand all or the hide automated message links (and don't click elsewhere on the page), keyboard shortcuts don't work. This was due to the focus still being on the link, which doesn't trigger the keyboard shortcuts. This change removes focus on the links after they are clicked so even if the user doesn't click elsewhere on the page, keyboard shortcuts will still work. Bug: Issue 4888 Change-Id: I51527325ea8d5d575c4d3f4ad02bf0b121fa8cce --- .../elements/change/gr-messages-list/gr-messages-list.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js index aa0703fe7f..cee2a69371 100644 --- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js +++ b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js @@ -113,11 +113,17 @@ for (var i = 0; i < messageEls.length; i++) { messageEls[i].expanded = this._expanded; } + if (e && e.target) { + e.target.blur(); + } }, _handleAutomatedMessageToggleTap: function(e) { e.preventDefault(); this._hideAutomated = !this._hideAutomated; + if (e && e.target) { + e.target.blur(); + } }, _handleScrollTo: function(e) {