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/options/password_manager_list.js

Issue 6246011: DOMUI: Make the password input field readonly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Delete fix. Created 9 years, 11 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/options/password_manager_list.js
diff --git a/chrome/browser/resources/options/password_manager_list.js b/chrome/browser/resources/options/password_manager_list.js
index 593a9bc5f96a5dfbd82404013105e82f8fbffce6..c2f233159f05d253a92d05787268f36bb8ef70c9 100644
--- a/chrome/browser/resources/options/password_manager_list.js
+++ b/chrome/browser/resources/options/password_manager_list.js
@@ -51,6 +51,7 @@ cr.define('options.passwordManager', function() {
// The password input field.
var passwordInput = this.ownerDocument.createElement('input');
passwordInput.className = 'inactive-password';
+ passwordInput.readOnly = true;
passwordInput.type = 'password';
passwordInput.value = this.password;
passwordInputDiv.appendChild(passwordInput);
@@ -67,12 +68,14 @@ cr.define('options.passwordManager', function() {
/** @inheritDoc */
selectionChanged: function() {
var passwordInput = this.querySelector('input[type=password]');
- var buttonSpan = passwordInput.nextSibling;
+ var textInput = this.querySelector('input[type=text]');
+ var input = passwordInput != undefined ? passwordInput : textInput;
stuartmorgan 2011/01/20 01:52:48 I believe in JS you can just do: var input = passw
James Hawkins 2011/01/20 01:54:55 Done.
+ var buttonSpan = input.nextSibling;
if (this.selected) {
- passwordInput.classList.remove('inactive-password');
+ input.classList.remove('inactive-password');
buttonSpan.classList.remove('hidden');
} else {
- passwordInput.classList.add('inactive-password');
+ input.classList.add('inactive-password');
buttonSpan.classList.add('hidden');
}
},
« 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