Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: chrome/browser/resources/options/inline_editable_list.js

Issue 39843002: Dragging text from 'chrome://settings/searchEngines' leaves input empty. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adressed comments Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698