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

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

Issue 2832023004: MD Settings: reduce amount of focus ripples shown by mouse (Closed)
Patch Set: . 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 3da7e7a3771d95773f3b294bd853e65a5d137363..b50d4fc6d0680c27ed6700cc9be789ca19d15000 100644
--- a/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
+++ b/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
@@ -51,6 +51,11 @@ Polymer({
this.lightDomChanged_.bind(this));
},
+ /** @override */
+ attached: function() {
+ this.outline_ = cr.ui.FocusOutlineManager.forDocument(document);
+ },
+
/**
* @param {!Event} e
* @private
@@ -82,7 +87,19 @@ Polymer({
// the currentRouteChanged callback. Using 'iron-select' listener which
// fires after the animation has finished allows focus() to work as
// expected.
- this.querySelector(selector).focus();
+ var toFocus = this.querySelector(selector);
+ var suppressInk = !this.outline_.visible;
+ var origNoInk;
+
+ if (suppressInk) {
+ origNoInk = toFocus.noink;
+ toFocus.noink = true;
+ }
+
+ toFocus.focus();
+
+ if (suppressInk)
+ toFocus.noink = origNoInk;
}
},
« no previous file with comments | « chrome/browser/resources/settings/settings_page/settings_animated_pages.html ('k') | third_party/polymer/v1_0/chromium.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698