Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Unified Diff: chrome/browser/resources/settings/settings_ui/settings_ui.js

Issue 2798223006: MD Settings: Remove tabindex from container after it is blurred. (Closed)
Patch Set: remove event parameter Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/settings/settings_ui/settings_ui.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/settings_ui/settings_ui.js
diff --git a/chrome/browser/resources/settings/settings_ui/settings_ui.js b/chrome/browser/resources/settings/settings_ui/settings_ui.js
index f0d6c15b5b453db715dfa7dce258384d36af6cf3..e3e0e591127546aab2d508ae395a82046d913bd0 100644
--- a/chrome/browser/resources/settings/settings_ui/settings_ui.js
+++ b/chrome/browser/resources/settings/settings_ui/settings_ui.js
@@ -268,7 +268,13 @@ Polymer({
/** @private */
onMenuClosed_: function() {
+ // Add tab index so that the container can be focused.
+ this.$.container.setAttribute('tabindex', '-1');
this.$.container.focus();
+
+ listenOnce(this.$.container, ['blur', 'pointerdown'], function() {
+ this.$.container.removeAttribute('tabindex');
+ }.bind(this));
},
/** @private */
« no previous file with comments | « chrome/browser/resources/settings/settings_ui/settings_ui.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698