summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/options
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-05 18:18:53 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-05 18:18:53 +0000
commitcc1947f03e16cc3daef39c738cafae9fa5fbac0f (patch)
tree2101f1d8779bd77344c5f1faa491c2d4b9aa8fee /chrome/browser/resources/options
parentf2c678f7b0e407393b7606acd947e7a271460766 (diff)
downloadchromium_src-cc1947f03e16cc3daef39c738cafae9fa5fbac0f.zip
chromium_src-cc1947f03e16cc3daef39c738cafae9fa5fbac0f.tar.gz
chromium_src-cc1947f03e16cc3daef39c738cafae9fa5fbac0f.tar.bz2
DOMUI: Unselect all list items when the Autofill lists are blurred.
BUG=none TEST=none Review URL: http://codereview.chromium.org/5977011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70520 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/options')
-rw-r--r--chrome/browser/resources/options/autofill_options_list.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/chrome/browser/resources/options/autofill_options_list.js b/chrome/browser/resources/options/autofill_options_list.js
index 03abb16..c2173d5 100644
--- a/chrome/browser/resources/options/autofill_options_list.js
+++ b/chrome/browser/resources/options/autofill_options_list.js
@@ -84,6 +84,20 @@ cr.define('options.autoFillOptions', function() {
AutoFillAddressList.prototype = {
__proto__: DeletableItemList.prototype,
+ decorate: function() {
+ DeletableItemList.prototype.decorate.call(this);
+
+ this.addEventListener('blur', this.onBlur_);
+ },
+
+ /**
+ * When the list loses focus, unselect all items in the list.
+ * @private
+ */
+ onBlur_: function() {
+ this.selectionModel.unselectAll();
+ },
+
/** @inheritDoc */
createItem: function(entry) {
return new AddressListItem(entry);
@@ -110,6 +124,20 @@ cr.define('options.autoFillOptions', function() {
AutoFillCreditCardList.prototype = {
__proto__: DeletableItemList.prototype,
+ decorate: function() {
+ DeletableItemList.prototype.decorate.call(this);
+
+ this.addEventListener('blur', this.onBlur_);
+ },
+
+ /**
+ * When the list loses focus, unselect all items in the list.
+ * @private
+ */
+ onBlur_: function() {
+ this.selectionModel.unselectAll();
+ },
+
/** @inheritDoc */
createItem: function(entry) {
return new CreditCardListItem(entry);