Index: chrome/browser/resources/options/inline_editable_list.js |
diff --git a/chrome/browser/resources/options/inline_editable_list.js b/chrome/browser/resources/options/inline_editable_list.js |
index ec65e43617d9875c3267f3c1779e6c4ff86fde73..93faef958711cb977252d073f234b1720e1cc99f 100644 |
--- a/chrome/browser/resources/options/inline_editable_list.js |
+++ b/chrome/browser/resources/options/inline_editable_list.js |
@@ -244,7 +244,12 @@ cr.define('options', function() { |
}, 50); |
} |
- inputEl.addEventListener('focus', this.handleFocus_.bind(this)); |
+ // In some cases 'focus' event may arrive before 'input'. |
+ // To make sure revalidation is triggered we postpone 'focus' handling. |
+ var handler = this.handleFocus_.bind(this); |
+ inputEl.addEventListener('focus', function() { |
+ window.setTimeout(handler, 0); |
+ }); |
container.appendChild(inputEl); |
this.editFields_.push(inputEl); |