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

Unified Diff: chrome/browser/resources/settings/site_settings/site_data.js

Issue 2817903004: MD Settings: Focus cookies search field when exiting cookie details subpage. (Closed)
Patch Set: Simulate pop state in test. 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
Index: chrome/browser/resources/settings/site_settings/site_data.js
diff --git a/chrome/browser/resources/settings/site_settings/site_data.js b/chrome/browser/resources/settings/site_settings/site_data.js
index 83e9ac09f3c00adb4337633db043bd023b1c6e83..d7dca1afc11572d30674acc8c3b686b173f08653 100644
--- a/chrome/browser/resources/settings/site_settings/site_data.js
+++ b/chrome/browser/resources/settings/site_settings/site_data.js
@@ -34,6 +34,30 @@ Polymer({
/** @private */
confirmationDeleteMsg_: String,
+
+ /** @type {!Map<string, string>} */
+ focusConfig: {
+ type: Object,
+ observer: 'focusConfigChanged_',
+ },
+ },
+
+ /**
+ * @param {!Map<string, string>} newConfig
+ * @param {?Map<string, string>} oldConfig
+ * @private
+ */
+ focusConfigChanged_: function(newConfig, oldConfig) {
+ // focusConfig is set only once on the parent, so this observer should only
+ // fire once.
+ assert(!oldConfig);
+
+ // Populate the |focusConfig| map of the parent <settings-animated-pages>
+ // element, with additional entries that correspond to subpage trigger
+ // elements residing in this element's Shadow DOM.
+ this.focusConfig.set(
+ settings.Route.SITE_SETTINGS_DATA_DETAILS.path,
+ '* /deep/ #filter /deep/ #searchInput');
},
/** @override */

Powered by Google App Engine
This is Rietveld 408576698