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

Unified Diff: chrome/browser/resources/settings/settings_page/settings_animated_pages.js

Issue 2813033004: MD Settings: Restore focus after exiting Content settings sub-subpages. (Closed)
Patch Set: Address comments. 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/settings_page/settings_animated_pages.js
diff --git a/chrome/browser/resources/settings/settings_page/settings_animated_pages.js b/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
index 18fe508cefda526a0384328fa6b00ee5bbad9dee..5e71132eaeeb62bccc4400fac8a1525c3131bca1 100644
--- a/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
+++ b/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
@@ -56,8 +56,13 @@ Polymer({
* @private
*/
onIronSelect_: function(e) {
- if (!this.focusConfig || !this.previousRoute_ ||
- e.detail.item.tagName != 'NEON-ANIMATABLE') {
+ if (!this.focusConfig || !this.previousRoute_)
+ return;
+
+ // Only handle iron-select events from neon-animatable elements and the
+ // SITE_SETTINGS subpage only.
+ if (!e.detail.item.matches(
+ 'neon-animatable, settings-subpage#site-settings')) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698