diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-20 01:57:35 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-20 01:57:35 +0000 |
commit | a0d191eaa02ee8132434a1ebdd53d5556b25e26e (patch) | |
tree | ecae6a04745ca8fedcf4f58be0659b306d77e0e4 /chrome/browser/resources | |
parent | b21bbd69f5371da9721aa507b9abe3bb6a2b704d (diff) | |
download | chromium_src-a0d191eaa02ee8132434a1ebdd53d5556b25e26e.zip chromium_src-a0d191eaa02ee8132434a1ebdd53d5556b25e26e.tar.gz chromium_src-a0d191eaa02ee8132434a1ebdd53d5556b25e26e.tar.bz2 |
DOMUI: Make the password input field readonly.
BUG=70006,70039
TEST=none
Review URL: http://codereview.chromium.org/6246011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r-- | chrome/browser/resources/options/password_manager_list.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/resources/options/password_manager_list.js b/chrome/browser/resources/options/password_manager_list.js index 593a9bc..505384c 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 || textInput; + 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'); } }, |