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

Unified Diff: chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js

Issue 2818283002: MD-Settings: A11y - Fix password list focusability. (Closed)
Patch Set: nit Created 3 years, 7 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/passwords_and_forms_page/passwords_section.js
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js
index a7e2eee26f327df08ebc78524f60303110dd37e0..fcbd49b2e3507c4cbf6f26f00ab1097025b82a82 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js
@@ -209,10 +209,14 @@ Polymer({
type: String,
value: '',
},
+
+ /** @private {!PasswordManager.PasswordUiEntry} */
+ lastFocused_: Object,
},
listeners: {
'show-password': 'showPassword_',
+ 'password-menu-tap': 'onPasswordMenuTap_',
},
/**
@@ -355,27 +359,17 @@ Polymer({
},
/**
- * Creates an empty password of specified length.
- * @param {number} length
- * @return {string} password
- * @private
- */
- getEmptyPassword_: function(length) {
- return ' '.repeat(length);
- },
-
- /**
* Opens the password action menu.
+ * @param {!Event} event
* @private
*/
- onPasswordMenuTap_: function(e) {
+ onPasswordMenuTap_: function(event) {
var menu = /** @type {!CrActionMenuElement} */(this.$.menu);
- var target = /** @type {!HTMLElement} */(Polymer.dom(e).localTarget);
- var passwordUiEntryEvent = /** @type {!PasswordUiEntryEvent} */(e);
+ var target = /** @type {!HTMLElement} */ (event.detail.target);
this.activePassword =
/** @type {!chrome.passwordsPrivate.PasswordUiEntry} */ (
- passwordUiEntryEvent.model.item);
+ event.detail.item);
menu.showAt(target);
this.activeDialogAnchor_ = target;
},

Powered by Google App Engine
This is Rietveld 408576698