diff options
author | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-09 07:00:59 +0000 |
---|---|---|
committer | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-09 07:00:59 +0000 |
commit | 53142c5f58150f9fb81f97ec84eb644ca6c95d83 (patch) | |
tree | e12d25310088c662d482b491443d4c71f5a2e513 /ui/webui | |
parent | 9cc751ef78fad90891a9dba15db16ba833a68354 (diff) | |
download | chromium_src-53142c5f58150f9fb81f97ec84eb644ca6c95d83.zip chromium_src-53142c5f58150f9fb81f97ec84eb644ca6c95d83.tar.gz chromium_src-53142c5f58150f9fb81f97ec84eb644ca6c95d83.tar.bz2 |
Regression: Unfocusing a list should trigger commitedit behavior.
Revert r216081, and fix crbug.com/269291 by another approach.
We should not skip hasElementFocus=false even if nothing is focused
because startup_overlay adds new item when the list loses focus.
We re-introduce longer delay for blur checking. The delay was removed
in r73854 [1].
[1] http://src.chromium.org/viewvc/chrome?view=revision&revision=73854
BUG=268291,269321
Review URL: https://chromiumcodereview.appspot.com/22638003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216622 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/webui')
-rw-r--r-- | ui/webui/resources/js/cr/ui/list.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/webui/resources/js/cr/ui/list.js b/ui/webui/resources/js/cr/ui/list.js index 2f7ced9..52f2896 100644 --- a/ui/webui/resources/js/cr/ui/list.js +++ b/ui/webui/resources/js/cr/ui/list.js @@ -515,13 +515,15 @@ cr.define('cr.ui', function() { // When the blur event happens we do not know who is getting focus so we // delay this a bit until we know if the new focus node is outside the // list. + // We need 51 msec delay because InlineEditableList sets focus after + // 50 msec. var list = this; var doc = e.target.ownerDocument; window.setTimeout(function() { var activeElement = doc.activeElement; - if (activeElement != doc.body && !list.contains(activeElement)) + if (!list.contains(activeElement)) list.hasElementFocus = false; - }); + }, 51); }, /** |