Index: components/autofill/ios/browser/resources/autofill_controller.js |
diff --git a/components/autofill/ios/browser/resources/autofill_controller.js b/components/autofill/ios/browser/resources/autofill_controller.js |
index a7600892fa6d0394b88247802fac467d54d448f2..50ec7364308aab36833cf0837bca65b00033b450 100644 |
--- a/components/autofill/ios/browser/resources/autofill_controller.js |
+++ b/components/autofill/ios/browser/resources/autofill_controller.js |
@@ -137,13 +137,6 @@ __gCrWeb.autofill.ROLE_ATTRIBUTE_PRESENTATION = 0; |
__gCrWeb.autofill.lastAutoFilledElement = null; |
/** |
- * The last element that was active (used to restore focus if necessary). |
- * |
- * @type {Element} |
- */ |
-__gCrWeb.autofill.lastActiveElement = null; |
- |
-/** |
* Whether CSS for autofilled elements has been injected into the page. |
* |
* @type {boolean} |
@@ -556,34 +549,12 @@ __gCrWeb.autofill['extractForms'] = function(requiredFields) { |
}; |
/** |
- * Stores the current active element. This is used to make the element active |
- * again in case the web view loses focus when a dialog is presented over it. |
- */ |
-__gCrWeb.autofill['storeActiveElement'] = function() { |
- __gCrWeb.autofill.lastActiveElement = document.activeElement; |
-} |
- |
-/** |
- * Clears the current active element by setting it to null. |
- */ |
-__gCrWeb.autofill['clearActiveElement'] = function() { |
- __gCrWeb.autofill.lastActiveElement = null; |
-} |
- |
-/** |
- * Fills data into the active form field. The active form field is either |
- * document.activeElement or the value of lastActiveElement if that value is |
- * non-null. |
+ * Fills data into the active form field. |
* |
* @param {AutofillFormFieldData} data The data to fill in. |
*/ |
__gCrWeb.autofill['fillActiveFormField'] = function(data) { |
var activeElement = document.activeElement; |
- if (__gCrWeb.autofill.lastActiveElement) { |
- activeElement = __gCrWeb.autofill.lastActiveElement; |
- activeElement.focus(); |
- __gCrWeb.autofill.lastActiveElement = null; |
- } |
if (data['name'] !== __gCrWeb['common'].nameForAutofill(activeElement)) { |
return; |
} |