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

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

Issue 2930683003: MD Settings: fix focus-row-behavior allowing invisible focus on rows. (Closed)
Patch Set: add clarifying comments Created 3 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/focus_row_behavior.js
diff --git a/chrome/browser/resources/settings/focus_row_behavior.js b/chrome/browser/resources/settings/focus_row_behavior.js
index 286c4eb65d62b9064f01002b28c7ce707f3d3e58..0946758d84f150d64f3a81b23f66c80ae7aee891 100644
--- a/chrome/browser/resources/settings/focus_row_behavior.js
+++ b/chrome/browser/resources/settings/focus_row_behavior.js
@@ -14,12 +14,15 @@ function FocusRowDelegate(listItem) {
FocusRowDelegate.prototype = {
/**
+ * This function gets called when the [focus-row-control] element receives
+ * the focus event.
* @override
* @param {!cr.ui.FocusRow} row
* @param {!Event} e
*/
onFocus: function(row, e) {
this.listItem_.lastFocused = e.path[0];
+ this.listItem_.tabIndex = -1;
},
/**
@@ -137,7 +140,10 @@ var FocusRowBehavior = {
}
},
- /** @private */
+ /**
+ * This function gets called when the row itself receives the focus event.
+ * @private
+ */
onFocus_: function() {
if (this.mouseFocused_) {
this.mouseFocused_ = false; // Consume and reset flag.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698