Index: chrome/browser/resources/options/autofill_edit_address_overlay.js |
diff --git a/chrome/browser/resources/options/autofill_edit_address_overlay.js b/chrome/browser/resources/options/autofill_edit_address_overlay.js |
index 9582ed23342b41a4925dde349e73769863a6786b..2ecbea3604296ec321e89454d6e07f285523dfe4 100644 |
--- a/chrome/browser/resources/options/autofill_edit_address_overlay.js |
+++ b/chrome/browser/resources/options/autofill_edit_address_overlay.js |
@@ -325,6 +325,15 @@ cr.define('options', function() { |
}, |
/** |
+ * Called to prepare the overlay when a new address is being added. |
+ * @private |
+ */ |
+ prepForNewAddress_: function() { |
+ // Focus the first element. |
+ this.pageDiv.querySelector('input').focus(); |
+ }, |
+ |
+ /** |
* Loads the address data from |address|, sets the input fields based on |
* this data, and stores the GUID and language code of the address. |
* @param {!Object} address Lots of info about an address from the browser. |
@@ -407,6 +416,10 @@ cr.define('options', function() { |
}, |
}; |
+ AutofillEditAddressOverlay.prepForNewAddress = function() { |
+ AutofillEditAddressOverlay.getInstance().prepForNewAddress_(); |
+ }; |
+ |
AutofillEditAddressOverlay.loadAddress = function(address) { |
AutofillEditAddressOverlay.getInstance().loadAddress_(address); |
}; |